Created
June 12, 2013 13:25
-
-
Save sta1r/5765210 to your computer and use it in GitHub Desktop.
Revisions
-
sta1r renamed this gist
Jun 12, 2013 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
sta1r created this gist
Jun 12, 2013 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ <?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>" />