-
-
Save wisbey/6592356 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// PHP is useful for conditional logic where the HTML structure is very different - e.g. | |
$number_of_highlight_boxes = '<t4 type="content" name="Number of boxes" output="normal" modifiers="" />'; | |
if ($number_of_highlight_boxes == "1") { /* write some HTML */ } else { /* write some more HTML */ } | |
?> | |
<!-- | |
However there's a useful way in T4 to selectively output fields IF they contain data, | |
and wrap HTML around the data if it is output e.g. | |
--> | |
<t4 type="content" name="Box section title" output="selective-output" modifiers="" format="<h2>$value</h2>" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment