I was refactoring an old application when I got stuck in a situation. When I {include="CouponSection"} and CouponSection in on the same path. Everything works fine.
But when "CouponSection" is in a subdirectory, {include="Modules/CouponSection"} Plain HTML is included but none of the {} is filled with data, No conditions were working. Strangely loop does execute if it in the included file, But Including a file within a loop does not work.
For Example -
<div class="Coupon-Holder">
{loop="$coupons"}
{include="Modules/CouponSection"}
{/loop}
</div>
Above does not work.
<div class="Coupon-Holder">
{include="Modules/CouponSection"}
</div>
Above does work if I add {loop="$coupons"} .... {/loop} in the Modules/CouponSection Itself. But that would make it non-resuable.
What am I doing wrong.