View Full Version : Make a conditional to work in a different template
jscieza
12-30-2010, 11:56 AM
Hi,
I'd like to make use of the conditional <if condition="$show['closethread']"> (located at showthread template) in my threadbit template. I tried and it doesn't work.
How I can make that conditional to work in my threadbit template?
Thank you,
Jonathan
Try using <if condition="$thread['open']"> instead
jscieza
12-30-2010, 12:41 PM
Thanks kh99 but unfortunately I have tried and it also isn't working :(
Thanks kh99 but unfortunately I have tried and it also isn't working :(
Hmm...it works for me. I put this in threadbit as a test:
<if condition="$thread['open']">
Thread open
<else />
Thread closed
</if>
and it correctly tells whether or not the thread is open. Maybe I misunderstood what you're trying to do.
ETA:...also, in showthread.php there is:
$show['closethread'] = iif($threadinfo['open'], true, false);
which is why I think $thread['open'] is equivalent to $show['closethread'].
jscieza
12-30-2010, 05:26 PM
Yes, you're right! It's working fine!
Thank you very much kh99 :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.