com presentations: Allow formatting in titles: templates/default/title.ezt
| From: | Derick Rethans | Date: | Sun, 17 May 2015 15:18:19 +0000 |
| Subject: | com presentations: Allow formatting in titles: templates/default/title.ezt | ||
| Groups: | php.pres | ||
| Request: | Send a blank email to pres+get-2074@lists.php.net to get a copy of this message | ||
Commit: a9040841d340e952c22a3f580a0ce15c8889ef5b
Author: Derick Rethans <github@derickrethans.nl> Sun, 17 May 2015 10:18:19 -0500
Parents: be09e0a5a7d867700051b0e52cab6be7dd756443
Branches: master
Link: http://git.php.net/?p=presentations.git;a=commitdiff;h=a9040841d340e952c22a3f580a0ce15c8889ef5b
Log:
Allow formatting in titles
Changed paths:
M templates/default/title.ezt
Diff:
diff --git a/templates/default/title.ezt b/templates/default/title.ezt
index 5a7a182..5e88ac1 100644
--- a/templates/default/title.ezt
+++ b/templates/default/title.ezt
@@ -1,3 +1,11 @@
-{use $node}
+{use $node, $pres}
{var $style = get_attribute( $node, 'style' )}
-<h1{if $style} class='style-{$style}'{/if}>{$node->nodeValue}</h1>
+<h1{if $style} class='style-{$style}'{/if}>
+{foreach $node->childNodes as $child}
+ {if is_set( $child->tagName )}
+ {include $child->tagName . '.ezt' send $child as $node, $pres, true as $inline}
+ {else}
+{raw format_text( $pres, $child->nodeValue )}
+ {/if}
+{/foreach}
+</h1>