DohTheme
Well-known member
Hi all,
what is the best practice to use "if" condition with style property to HTML class?
to make it more clear I have a property "dt_collapsible_extras" and I want to add it's class to HTML here is what I'm using now:
but in "PAGE_CONTAINER" and other templates it's been used in a different way like:
I tried to use this way but failed.
what is the best practice to use "if" condition with style property to HTML class?
to make it more clear I have a property "dt_collapsible_extras" and I want to add it's class to HTML here is what I'm using now:
HTML:
<xf:if is="property('dt_collapsible_extras')">
<div class="message-userExtras message-userExtras-body message-userExtras--collapsible">
<xf:else />
<div class="message-userExtras">
</xf:if>
but in "PAGE_CONTAINER" and other templates it's been used in a different way like:
HTML:
<div class="p-navgroup p-account {{ $xf.visitor.user_id ? 'p-navgroup--member' : 'p-navgroup--guest' }}">
I tried to use this way but failed.