![]() |
Template <if> tag
I have a personal project going on and I'm trying to develop a template system similar to the one vBulletin uses.
One thing has me stumped. I want to use the <if> tag in my templates, but they never get parsed. I looked in the vb code for some help, but I can't see anything that much different from vb is doing and what I'm doing to cause this. What is it in the vb that 'allows' the parsing to the <if> tag? The code I'm using to import that template and print it looks like: PHP Code:
|
Template conditionals are transformed into ternary operations (in the current version of vBulletin). The "template" is then evaluated.
The following: Code:
<if condition="$show['guest']">Something<else />Else</if> Code:
(($show['guest']) ? "Something" : "Else") |
Quote:
|
The template is transformed into raw PHP and stored in the database, therefore, it is actually done when you save the template.
|
All times are GMT. The time now is 05:36 PM. |
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:
|