tafreehm Well-known member Mar 10, 2013 #1 Hello, I wanna include some JS and CSS code in header. But I only want it to appear at one specific page. can someone guide me with <xen: if> condition for page, please ? Thank You
Hello, I wanna include some JS and CSS code in header. But I only want it to appear at one specific page. can someone guide me with <xen: if> condition for page, please ? Thank You
P Paul B XenForo moderator Staff member Mar 10, 2013 #2 Which page? A list of the most commonly used conditionals is here: http://xenforo.com/community/threads/frequently-asked-questions.5183/#post-182355 Upvote 0 Downvote
Which page? A list of the most commonly used conditionals is here: http://xenforo.com/community/threads/frequently-asked-questions.5183/#post-182355
tafreehm Well-known member Mar 10, 2013 #3 Brogan said: Which page? A list of the most commonly used conditionals is here: http://xenforo.com/community/threads/frequently-asked-questions.5183/#post-182355 Click to expand... Yes, I have been through that FAQ, but could not find it for a page. I am referring to XF PAGES. For example: http://xenforo.com/community/pages/example-page/ Upvote 0 Downvote
Brogan said: Which page? A list of the most commonly used conditionals is here: http://xenforo.com/community/threads/frequently-asked-questions.5183/#post-182355 Click to expand... Yes, I have been through that FAQ, but could not find it for a page. I am referring to XF PAGES. For example: http://xenforo.com/community/pages/example-page/
P Paul B XenForo moderator Staff member Mar 11, 2013 #4 The template for a page node is pagenode_container <xen:if is="{$contentTemplate} == 'pagenode_container'"> This content will show on pages </xen:if> Upvote 0 Downvote
The template for a page node is pagenode_container <xen:if is="{$contentTemplate} == 'pagenode_container'"> This content will show on pages </xen:if>
Newt Active member Mar 19, 2015 #5 Hi @tafreehm how did you manage to make it work for a specific page using the above code? Thanks Upvote 0 Downvote
EQnoble Well-known member Mar 19, 2015 #6 Newt said: Hi @tafreehm how did you manage to make it work for a specific page using the above code? Thanks Click to expand... Code: <xen:if is="{$page.node_id} == 4"> If page node and node id is 4 include this </xen:if> Upvote 0 Downvote
Newt said: Hi @tafreehm how did you manage to make it work for a specific page using the above code? Thanks Click to expand... Code: <xen:if is="{$page.node_id} == 4"> If page node and node id is 4 include this </xen:if>