PDA

View Full Version : Conditional Statement for Specific Pages


AndrewO
04-06-2012, 01:53 PM
I'm looking for a way to single out the register page within my templates.

Basically, I have a big header in my navbar file that shows only to guests (using the conditional statement for that), outlining the benefits of joining my forum. When they click the register button in this header, it takes them to register.php, of course. But then, above the registration form, they see the 300px tall banner that they just clicked on.

Is there any way for me to show specific code on all pages except register.php?

In PHP this would be easy, you would just say if (this page is register.php) {} else { show banner }

I'm fairly new to VB, is there a way to do something similar?

Thanks!

Altari
04-06-2012, 02:03 PM
Hello,
Sorry for my bad english, i'm french ;)

have a look on this article : https://vborg.vbsupport.ru/showthread.php?t=231525

What you are looking for is :
<vb:if condition="THIS_SCRIPT != 'register'">Don't show this on register.php</vb:if>

AndrewO
04-06-2012, 08:02 PM
Oh, that article was exactly what I was looking for. I knew there had to be conditionals, but I couldn't find a complete list.

That code worked perfectly - merci beaucoup! :)