Azaly Active member Sep 9, 2021 #1 Hi! I'm trying to change text for one of my search forum node with id=79, but code for regular forum type won't work. Code: <xf:if is="$forum.node_id == 79"> {{ phrase('last_games') }} <xf:else /> {{ phrase('widget.forum_overview_new_posts') }} </xf:if> Please help.
Hi! I'm trying to change text for one of my search forum node with id=79, but code for regular forum type won't work. Code: <xf:if is="$forum.node_id == 79"> {{ phrase('last_games') }} <xf:else /> {{ phrase('widget.forum_overview_new_posts') }} </xf:if> Please help.
P Paul B XenForo moderator Staff member Sep 9, 2021 #2 Which template are you using that in? The var in the search forum template is $searchForum.node_id. Upvote 0 Downvote
Azaly Active member Sep 9, 2021 #3 Brogan said: The var in the search forum template is $searchForum.node_id. Click to expand... Yay! Thats work! Thank you. Upvote 0 Downvote
Brogan said: The var in the search forum template is $searchForum.node_id. Click to expand... Yay! Thats work! Thank you.
P Paul B XenForo moderator Staff member Sep 9, 2021 #4 For future reference, you can add this to the template you are working with and it will show all the vars natively available: {{ dump(vars()) }} . More detailed help here: Identifying and using variables in templates, advertising positions, navigation entries, and widgets What are variables? In simple terms, variables are names which hold values. These values are stored in the database and are used in templates to evaluate and present the content and data. Using variables in templates opens up a lot of... xenforo.com Upvote 0 Downvote
For future reference, you can add this to the template you are working with and it will show all the vars natively available: {{ dump(vars()) }} . More detailed help here: Identifying and using variables in templates, advertising positions, navigation entries, and widgets What are variables? In simple terms, variables are names which hold values. These values are stored in the database and are used in templates to evaluate and present the content and data. Using variables in templates opens up a lot of... xenforo.com