LordsKing Active member Jun 21, 2014 #1 Hello Is this variable exist ? : {$user.group_id} Because i want to add the color of the member's group ! Example : if the user has the user group id 3 : <span class="style{$user.group_id}"> text</span> SO it will be : <span class="style3"> text </span> Thanks
Hello Is this variable exist ? : {$user.group_id} Because i want to add the color of the member's group ! Example : if the user has the user group id 3 : <span class="style{$user.group_id}"> text</span> SO it will be : <span class="style3"> text </span> Thanks
P Paul B XenForo moderator Staff member Jun 21, 2014 #2 http://xenforo.com/community/resources/conditional-statements.1604/ <xen:if is="{xen:helper ismemberof, $visitor, x, y}"> Upvote 0 Downvote
http://xenforo.com/community/resources/conditional-statements.1604/ <xen:if is="{xen:helper ismemberof, $visitor, x, y}">
LordsKing Active member Jun 21, 2014 #3 Brogan said: http://xenforo.com/community/resources/conditional-statements.1604/ <xen:if is="{xen:helper ismemberof, $visitor, x, y}"> Click to expand... Yes i saw that before create this post but for my code, this will don't work because it's not a conditional Upvote 0 Downvote
Brogan said: http://xenforo.com/community/resources/conditional-statements.1604/ <xen:if is="{xen:helper ismemberof, $visitor, x, y}"> Click to expand... Yes i saw that before create this post but for my code, this will don't work because it's not a conditional
P Paul B XenForo moderator Staff member Jun 21, 2014 #4 I haven't actually tried it with that but you can use an if statement inline in CSS classes. Otherwise you can use it in a standard if/else. Upvote 0 Downvote
I haven't actually tried it with that but you can use an if statement inline in CSS classes. Otherwise you can use it in a standard if/else.
LordsKing Active member Jun 21, 2014 #5 Brogan said: I haven't actually tried it with that but you can use an if statement inline in CSS classes. Otherwise you can use it in a standard if/else. Click to expand... Ok I will try to do that with many ideas Upvote 0 Downvote
Brogan said: I haven't actually tried it with that but you can use an if statement inline in CSS classes. Otherwise you can use it in a standard if/else. Click to expand... Ok I will try to do that with many ideas
P Paul B XenForo moderator Staff member Jun 21, 2014 #6 For example: Code: <div class="{xen:if "{$param}", 'thisClass', 'thatClass'} anotherClass">Content</div> Upvote 0 Downvote
For example: Code: <div class="{xen:if "{$param}", 'thisClass', 'thatClass'} anotherClass">Content</div>
LordsKing Active member Jun 21, 2014 #7 Brogan said: For example: Code: <div class="{xen:if "{$param}", 'thisClass', 'thatClass'} anotherClass">Content</div> Click to expand... There is a lot of user groups :/ Upvote 0 Downvote
Brogan said: For example: Code: <div class="{xen:if "{$param}", 'thisClass', 'thatClass'} anotherClass">Content</div> Click to expand... There is a lot of user groups :/