Ques/Help Adding a conditional styling class to template

M

Mr Lucky

Guest
I want to have a message background which is different only for one user. I have added the class mod-message to post_macros by inserting the conditional lafter the existing two classes (message-body and js-selectToQuote)

Code:

<article class="message-body js-selectToQuote <xf:if is="$post.user_id == 9092">mod-message</xf:if>">

This does work but I am concerned it is not the correct way to do it as the inserted text shhgowed red in the template edit.

Can anyone please confirm this is OK...

Read more

Continue reading...