What will the conditional tags be named?
Conditional Template Tags
Collapse
X
-
What will "they" be named?
There is the <if> conditional tag... It includes a closing tag of </if> and an intermediate tag of <else>... Not really sure it needs another name.Translations provided by Google.
Wayne Luke
The Rabid Badger - a vBulletin Cloud demonstration site.
vBulletin 5 APIComment
-
So, you do not plan to make downward compatible conditionals?
I suspect not everyone will upgrade to 3.0 right away and it would be good to allow hack writers downward compatibility for templates
For example:
HTML Code:<if condition="$usergroupid==6"> Administrator <else /> Non administrator </if>
Would it be possible to allow conditional tags to suppost comments?
For example allow it to be written as:
HTML Code:<!--if condition="$usergroupid==6" /> Administrator <else /> Non administrator <endif /-->
HTML Code:<!--if condition="$usergroupid==6" /> Administrator <else /--> Non administrator <endif />
Couple of more questions I have.
How do you test for greater than or less than condition? I don't think > and < will work even if part of a property.
Also, can you have nested conditions? If not, I would like to request that you implement them.Last edited by MiF; Wed 19 Feb '03, 5:10pm.Comment
-
Downward compatibility is rather pointless since every vB 3.0 template will be different than a vB 2 template. They are either (a) renamed, (b) removed or (c) condensed. For example, there is only one template for all of the mod actions that can be performed on a thread. Each action is handled by a conditional.
Yes you can next conditions.
Yes, you can use < and > since it is the quotes that start and end of the condition.
<if condition="$usergroupid > 3">
...
</if>Comment
-
Originally posted by freddieDownward compatibility is rather pointless since every vB 3.0 template will be different than a vB 2 template. They are either (a) renamed, (b) removed or (c) condensed. For example, there is only one template for all of the mod actions that can be performed on a thread. Each action is handled by a conditional.
Another question though.
Would it be better to use tags that do not require closing tag?
<if />
<else />
<endif />
Rather than using </if>. Could you end up with some invalid HTML code when you test your templates without conditional preprocessor?Comment
-
how do you handle other double-quotes in conditional tags:
<if condition="$name=="hello"">...</if>
does this work:
<if condition="$name==\"hello\"">...</if>
??Comment
-
Originally posted by Cyborg from DHhow do you handle other double-quotes in conditional tags:
<if condition="$name=="hello"">...</if>
does this work:
<if condition="$name==\"hello\"">...</if>
??
How about these:
<if condition='$currencysign == "\$"'>...</if>
<if condition="$currencysign == \"\\$\"">...</if>
Are the above two written correctly to test for $?Comment
Related Topics
Collapse
-
by tracks78Having this problem on my forum when I turn on html, here's a screenshot while I have the editor open:
I'm not great at html but I would assume this should make 2 columns, 3 rows,...-
Channel: Support Issues & Questions
-
Comment