How to hide part of the html code?

Status

offline

Posts

5

Likes

3

Bits Credits

0

LEVEL

0

185 XP

I created a page with html code in the nodes.
I understand how to hide the page from the guests in principle through the node/rights settings, but this option is not suitable.
How can I hide part of the html code on this page from the guests?

To make it more clear:

Code:
<footer>

<!-- for all -->
<p>Hello all world</p>

<!-- for members only -->
<p>Hello wolrd</p>

</footer>
 

FateKid

DEVIL DID IT

Admin

Status

offline

Posts

14,962

Likes

130,628

Resources

3,400

Bits Credits

503

LEVEL

11

5,910 XP

Done, i found
Code:
<xf:if is="{$xf.visitor.user_id}">
That works, yes. This Xen IF statement will compare the user's ID.
If the user indeed does have an ID number, that does mean they are not a guest.

You can also use things like this (checking if a user is indeed part of a group or groups.
HTML:
<!-- If user is part of group (singular) -->
<xf:if is="$xf.visitor.isMemberOf(X)"> </xf:if>

<!-- If user is part of group (array, multiple) -->
<xf:if is="$xf.visitor.isMemberOf([X,X])"> </xf:if>

There's a lot of explore in the XenForo syntax. I'm sure you'll enjoy reading this.
 

Latest threads

Forum statistics

Threads
58,393
Messages
89,488
Members
55,291
Latest member
Fortyros
Top Bottom