PDA

View Full Version : $thread['prefixid'] alternatives


punchbowl
06-03-2011, 09:03 AM
I'm trying to show a different message depending on the thread prefix. I can do it in the postbit of showthread using


<vb:if condition="$thread['prefixid'] == job">PREFIX = JOB</vb:if>

but if I try the same in an ad template, the navbar, footer or anywhere else vb doesn't have a clue what I'm talking about. Is there any other conditional I can use, say in ad_navbar_below to show a message based on which thread prefix is used?

<vb:if condition="THIS_SCRIPT == 'showthread'">THIS IS SHOWTHREAD</vb:if> works anywhere but if I add AND $thread['prefixid'] == job it doesn't.

Thanks in advance:o

edit: I was able to add the conditional directly into the show thread template after $navbar so that's a kinda workable solution for me. Seems that $templater->register('thread', $thread); needs to happen for ad_navbar_below so it can be recognised there.