Forum
Simple Question on identifying pages in a content template
How do I use conditionals in a content template if I want to show things on certain pages e.g.
if pagePath = 'index.php' do this?
I looked through the docs in Templates and Pages and couldn't see anything and the forum search didn't have anything under "pagePath" or "conditionals"
What I'm trying to do is only show some elements on specific pages.
Thanks
Andrew,
Hi, you may want to take a look at this page in the documentation: https://docs.grabaperch.com/docs/templates/passing-variables-into-templates/
If you set a variable on your page(s) using:
In your template, you can use conditionals to check for the value of your variable:
Hopefully this helps!
I had saw that but I wondered if there were any global variables I could use without setting my own
There's nothing global, so setting your own is the way to go.