Log in

View Full Version : vBulletin if / else help!


nick-harper
11-12-2008, 10:21 AM
Hi,

I have this code:

<if condition="$show['taglist']">$threadinfo[taglist]
<else />
<if condition="$show['threadinfo']">$threadinfo[title]
<else />
<if condition="$show['foruminfo']">$foruminfo[title_clean]
<else />
Football
</if>
</if>
</if>

What I am trying to do is echo the tags first, then if there are none echo the thread title. then in the forum view echo the forum name and if there is nothing else just say football.

At the minute it echos the tags AND the title.

How can I sort this to check for tags and if there are none use the title?

Thanks

Lynne
11-12-2008, 02:34 PM
You aren't checking at all to see if there are any tags, all you are doing is saying if we should show them, then show them. The condition for if there are any tags to show would be:

<if condition="$threadinfo[taglist]">
if there are tags, show them
</if>