Matt C.
Well-known member
I'm trying to add a class to the article element in the post_macros template if the post user id equals the visitors user id.
Like this:
But obviously I can't add an if statement inside an html element.
Can I do it with this format? I'm unfamiliar with it.
Thank you.
Like this:
Code:
<xf:if is="{$post.User.user_id} == {$xf.visitor.user_id}">
message--selfPost
</xf:if>
But obviously I can't add an if statement inside an html element.
Can I do it with this format? I'm unfamiliar with it.
HTML:
{{ $isIgnored ? 'is-ignored' : '' }}
Thank you.