[Catalyst-commits] r7447 -
trunk/Catalyst-View-TT-Bootstrap/lib/Catalyst/Helper/View/TT
jshirley at dev.catalyst.perl.org
jshirley at dev.catalyst.perl.org
Thu Feb 21 19:35:36 GMT 2008
Author: jshirley
Date: 2008-02-21 19:35:36 +0000 (Thu, 21 Feb 2008)
New Revision: 7447
Modified:
trunk/Catalyst-View-TT-Bootstrap/lib/Catalyst/Helper/View/TT/Bootstrap.pm
Log:
Adding in support for header and footers to add to page. vars
Modified: trunk/Catalyst-View-TT-Bootstrap/lib/Catalyst/Helper/View/TT/Bootstrap.pm
===================================================================
--- trunk/Catalyst-View-TT-Bootstrap/lib/Catalyst/Helper/View/TT/Bootstrap.pm 2008-02-21 00:25:23 UTC (rev 7446)
+++ trunk/Catalyst-View-TT-Bootstrap/lib/Catalyst/Helper/View/TT/Bootstrap.pm 2008-02-21 19:35:36 UTC (rev 7447)
@@ -350,7 +350,19 @@
~%]
__site_html__
[%~ TAGS star ~%]
-[% IF c.debug && debug_init.defined; $debug_init; END %]
+[%~
+
+IF c.debug && debug_init.defined; $debug_init; END;
+
+IF page.header && page.header != 'none';
+ header = PROCESS "site/header/${page.header}.tt";
+END;
+
+IF page.footer && page.header != 'none';
+ footer = PROCESS "site/footer/${page.footer}.tt";
+END;
+
+~%]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="[% page.language %]">
<head>
@@ -397,14 +409,9 @@
<body class="[% page.body.classes.join(' ') %] IE IE7">
<![endif]-->
[% # Drop in the header if appropriate
- IF page.header && page.header != 'none';
- PROCESS "site/header/${page.header}.tt";
- END; %]
+ header %]
<div class="[% page.content_class %]">[% content %]</div>
- [% # Drop in the footer if appropriate
- IF page.footer && page.footer != 'none';
- PROCESS "site/footer/${page.footer}.tt";
- END;
+ [% footer;
# Add footer scripts
page.body.scripts = page.body.scripts.unique;
More information about the Catalyst-commits
mailing list