View Full Version : If condition help
AFMichael
02-09-2006, 07:33 PM
What I am basically asking is this, in the coding below, am I able to check a condition whereas if the page is in the control panel, it shows the true boolean value. Else, shows the false boolean value.
<if condition="a condition">
htmlcode
<else />
other html code
</if>
Marco van Herwaarden
02-09-2006, 07:41 PM
<if condition="VB_AREA == 'AdminCP'">
AFMichael
02-09-2006, 07:43 PM
Ok, so for the UserCP, it would be:
<if condition="VB_AREA == 'UserCP'">
tnguy3n
02-09-2006, 07:45 PM
For UserCP, use <if conditinon="THIS_SCRIPT == 'usercp'"></if>.
Marco van Herwaarden
02-09-2006, 07:45 PM
No then it would be 'Forum', there are only 2 areas identified currently in vB.
If you want to know exactly what script is being run, check the content of THIS_SCRIPT (current filename without .php)
AFMichael
02-09-2006, 07:47 PM
Well, this is what I am trying to do. I have a side column in the header template. Now, when a member goes to the usercp pages, it will show a certain navigation menu. If they're not there, it will not show up. Can this be done?
The ONLY way that I know about doing this is by creating a seperate header for USERCP_SHELL to contain the special navigation. I was hoping to find a way around from doing this as I'll have to update the header in two places now instead of just one.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.