I'd like to have a header.php file throughout my site. I currently have the following:
header.php
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="<?php if(isset($depth)){echo $depth;};?>css/style.css">
functions.php
function include_layout_template($template="", $depth="")
{
global $depth;
include(SITE_ROOT.DS.'public'.DS.'layouts'.DS.$template);
}
index.php
<?php include_layout_template('header.php', "../"); ?>
But $depth dissappears, I can't even echo $depth; its just blank. How can I get the depth variable for use in header.php?