XF 2.3 Template conditional question

Anatoliy

Well-known member
I created an addon that displays pages using a custom template. Everything is fine except pagespeed insights says that some clickable elements are too close. It looks like those are links contact us, help etc. at the bottom. I want to remove them on my add-on pages.

Is there a condition I could use for that? Something like
Code:
<xf:if is="custom_template_name = my_template_name">
 
Maybe you can add a template modification to the extra.less template for your add-on:
Less:
[data-template="my_template_name"] {
    .p-footer-row-opposite {
        display: none;
    }
}
 
Maybe you can add a template modification to the extra.less template for your add-on:
Less:
[data-template="my_template_name"] {
    .p-footer-row-opposite {
        display: none;
    }
}
This one works, so I didn't even try the second one. Thanks!
 
<xf:if is="$template == 'my_template_name'"> ... </xf:if>

I used this solution and works like charm for my case. I wanted to add a widget in the PAGE_CONTAINER but only for a specific template. I tried to put that widget on the template but it didn't show the way I wanted (my style is very modified). So this did the trick (y)
 
Back
Top Bottom