The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Template <vb:if> with Profile Field
Hi,
I have a profile field which isn't required, so members can leave it blank but would like to keep it from displaying the title if it is blank. I'm sure there's a simple if statement I can use to check to see if there's any data in it, could someone help me with that please? Specifically, it's for the Flag Mod, this is the code in the postbit template I have. Code:
<!-- Wy Country Flags Start --> <div align="left">Country: </dt> <vb:if condition="$post['field5']"> <img src="{ROOT}/images/buttons/flags/{vb:raw post.field5}.GIF" alt="Users Flag!" align="center" border="" /></vb:if></div> <!-- Wy Flags End --> Edit: Doh! I shouldn't have doubted myself and tinkered a little longer: Code:
<!-- Wy Country Flags Start --> <vb:if condition="$post['field5'] == ''"> <vb:else /> <div align="left">Country: </dt> <vb:if condition="$post['field5'] "> <img src="{ROOT}/images/buttons/flags/{vb:raw post.field5}.GIF" alt="Users Flag!" align="center" border="" /></vb:if></div> </vb:if> <!-- Wy Flags End --> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|