PDA

View Full Version : Front Page Template Questions


No Limit
03-01-2011, 02:10 PM
Hello!

I would like to include a splash image on my homepage which welcomes everyone to the forum just as I set up here:

http://www.leftunderground.com/content/

However, I would only like this image to appear on the front page. Is there a conditional statement I could use in a template to achieve this? I can do this by using the various methods described to include PHP code in templates but I was hoping there was an easier way.

Also, is there a way to check if the user is logged in or not so that I can fetch a different graphic based on that?

Help would be appreciated, thanks in advance.

Lynne
03-01-2011, 03:10 PM
<vb:if condition="$_GET['r'] == '1-home-page-one' OR !$_GET['r']">your message</vb:if>


Of course, change 1-home-page-one to whatever your home page is called.

No Limit
03-01-2011, 04:44 PM
That works perfectly, thank you very much. Is there a way to detect if they are a logged in user or not? Or better yet is there a reference somewhere for all the variables available?

Lynne
03-01-2011, 09:30 PM
Variables names changed based on what page you are on. But, here is an article that may help you out - vB4 Template Conditionals List (https://vborg.vbsupport.ru/showthread.php?t=231525)

No Limit
03-02-2011, 12:48 AM
Awesome! Thank you.