Skip to content

Conditions not working in partials, when included from a sub-directory. #51

@Abhinav1217

Description

@Abhinav1217

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions