View Full Version : Conditional based on cmps page
m0nde
07-07-2005, 01:31 PM
I want to exclude a certain picture and link from a certain CMPS page.
How do I check for this page and exclude it using an IF THEN?
The page identifier is felicity_shower and is called via http://www.bostonlove.org/index.php?page=felicity_shower
Thanks in advance.
- Sid
Brian
07-07-2005, 01:43 PM
<if condition="$page == 'your_page'">
<else />
</if>
m0nde
07-07-2005, 01:58 PM
Thank you very much for your quick reply.
Can you tell me the way to check using the equivalent of a Boolean NOT?
Such as if != which i've used in C language.
Is it the same thing in PHP?
- Sid
Brian
07-07-2005, 02:01 PM
Yes, you can use != to say "doesn't equal". :)
m0nde
07-07-2005, 02:40 PM
I'm putting this in my navbar template to stop that page from showing a certain link.
When I do so, it doesn't seem to be checking anything.
I've tried this simple test:
<if condition="$page == 'felicity_shower'">hello world</if>and nothing shows up on that page or any page on my site.
If I change it to:
<if condition="$page != 'felicity_shower'">hello world</if>It shows up on every page including the one with identifier felicity_shower
- Sid
Brian
07-07-2005, 03:40 PM
Try $pages['name'] instead of $page.
m0nde
07-07-2005, 04:36 PM
Thank you, that works!
- Sid
vBulletin® v3.7.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.