Get template elements to only show when on certain page
Posted: Wed Jan 12, 2011 2:55 pm
Hi, I have searched around and so far not found anything that covers what I am looking for.
I am trying to create a template with a sidebar. On that side bar I will have some elements, for example I will have a navigation menu and a mail shot signup box. I can create the template with sidebar fine, however I would like to get certain parts of the template to only show when on certain pages of the website.
For example:
1) When navigating the "Home Users" page on our website, I would like the mailshot signup box to display the signup to the home users mailing list in the side.
2) When navigating a different section of the website, e.g Support, I don't want the mailshot signup box to display in the sidebar at all.
I would like some sort of 'if' statement. So {if page=home display(<div>Some content for home users</div>)} {else if page=business display(<div>Some content for business users</div>)}
Perhaps someone could give me some ideas.
Many thanks.
I am trying to create a template with a sidebar. On that side bar I will have some elements, for example I will have a navigation menu and a mail shot signup box. I can create the template with sidebar fine, however I would like to get certain parts of the template to only show when on certain pages of the website.
For example:
1) When navigating the "Home Users" page on our website, I would like the mailshot signup box to display the signup to the home users mailing list in the side.
2) When navigating a different section of the website, e.g Support, I don't want the mailshot signup box to display in the sidebar at all.
I would like some sort of 'if' statement. So {if page=home display(<div>Some content for home users</div>)} {else if page=business display(<div>Some content for business users</div>)}
Perhaps someone could give me some ideas.
Many thanks.
