Browse files

Moved template files into a subdir page. Base template now uses a dir…

… path base to it from the library to make it more dynamic
  • Loading branch information...
1 parent 4dc076a commit 3afda448efeae275c4729b372a33c6f3bd456344 Ollie Rattue committed Dec 5, 2011
View
1 libraries/template.php
@@ -22,6 +22,7 @@ class Template {
var $body_id = NULL;
var $body_class = NULL;
var $page_title;
+ var $template_directory = 'templates/page';
var $template_name = 'default';
function Template()
View
8 views/templates/default/base.php → views/templates/page/default/base.php
@@ -5,10 +5,10 @@
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]-->
<?php /* Consider adding a manifest.appcache: h5bp.com/d/Offline */ ?>
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
-<?php $this->load->view('templates/default/head', $this->data);
+<?php $this->load->view("{$template_directory}/{$template_name}/head");
echo generate_body_tag($body_id, $body_class)."\n\t";
echo '<div class="container clearfix">' . "\n\t";
-$this->load->view('templates/default/header', $this->data);
+$this->load->view("{$template_directory}/{$template_name}/header");
echo '<div id="main" role="main" class="clearfix">' . "\n\t";
if (is_array($path))
@@ -24,9 +24,9 @@
}
echo '</div>' . "\n";
-$this->load->view('templates/default/footer', $this->data);
+$this->load->view("{$template_directory}/{$template_name}/footer");
echo '</div>' . "\n";
-$this->load->view('templates/default/footer_js', $this->data);
+$this->load->view("{$template_directory}/{$template_name}/footer_js");
echo '</body>' . "\n";
?>
</html>
View
0 views/templates/default/footer.php → views/templates/page/default/footer.php
File renamed without changes.
View
0 views/templates/default/footer_js.php → views/templates/page/default/footer_js.php
File renamed without changes.
View
0 views/templates/default/head.php → views/templates/page/default/head.php
File renamed without changes.
View
0 views/templates/default/header.php → views/templates/page/default/header.php
File renamed without changes.

0 comments on commit 3afda44

Please sign in to comment.