![]() |
template condition problem
I want to modify the postbit to show some content based on the user custom field's content.
Here is my code. <if condition="$post['field2'] == XXXX"> <div class="smallfont">Message1</div> <else /> <if condition="$post['field2'] == YYYY"> <div class="smallfont">Message2</div> <else /> Message3 </if> </if> but it only shows Message3 in all conditions. Can anyone help me? FYI, I can show the content of $post[field2] by using <p>$post[field2]</p> Thanks. |
Code:
<if condition="$post[field2] == 'XXXX'"> |
It depends if the XXXX and YYYY are numbers, but you can enclose them in quotes either way.
In conditions, array keys should ALWAYS be quoted if they are strings. Read a little bit of this thread, it is a prime example of why... https://vborg.vbsupport.ru/showthread.php?t=120134 |
All times are GMT. The time now is 01:35 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|