The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
using VB:VAR within a conditional?
Everytime I try this I get a parse error when I save the template. I have no idea what I'm doing wrong, but it's probably something pretty simple/stupid. Here's an example:
Code:
<table class="tborder" cellpadding="{vb:stylevar cellpadding}" cellspacing="{vb:stylevar cellspacing}" border="0" width="100%"> <tr> <td class="thead" width="100%" <vb:if condition="{vb:raw caneditforms}">colspan="2"</vb:if>>{vb:phrase title}</td> </tr> The following error occurred when attempting to evaluate this template: Quote:
Thanks for your help! |
#2
|
||||
|
||||
You do not use
Code:
{vb:raw var} Code:
<vb:if condition="can_moderate()">colspan="2"</vb:if> |
#3
|
|||
|
|||
Quote:
Code:
<vb:if condition="my_custom_var()">colspan="2"</vb:if> |
#4
|
||||
|
||||
Quote:
So for a custom variable it would be. if $customvar is set: Code:
<vb:if condition="$customvar">Show this</vb:if> Code:
<vb:if condition="$customvar == blah">Show this if $customvar equals blah</vb:if> Code:
<vb:if condition="$customvar != blah">Show this if $customvar does not equal blah</vb:if> Check out - https://vborg.vbsupport.ru/showthread.php?p=1941139 |
#5
|
|||
|
|||
Got it! Thanks much, and I rated your other thread 5 stars and subbed to it.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|