dynamic navbar
This commit is contained in:
parent
d68eb37381
commit
8f485a0832
|
|
@ -32,6 +32,7 @@ class EntryPoint {
|
||||||
|
|
||||||
$page = $this->routes->getController($controllerName)->$functionName();
|
$page = $this->routes->getController($controllerName)->$functionName();
|
||||||
$content = $this->loadTemplate('../templates/' . $page['template'], $page['vars']);
|
$content = $this->loadTemplate('../templates/' . $page['template'], $page['vars']);
|
||||||
|
$nav = $this->loadTemplate('../templates/nav.html.php', $page['vars']);
|
||||||
$title = $page['title'];
|
$title = $page['title'];
|
||||||
require '../templates/layout.html.php';
|
require '../templates/layout.html.php';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,10 +21,10 @@
|
||||||
<li><a href="/">Home</a></li>
|
<li><a href="/">Home</a></li>
|
||||||
<li>Jobs
|
<li>Jobs
|
||||||
<ul>
|
<ul>
|
||||||
<?php require 'nav.html.php'?>
|
<?=$nav?>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="?page=about">About Us</a></li>
|
<li><a href="/jobs/about">About Us</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
<img src="../images/randombanner.php"/>
|
<img src="../images/randombanner.php"/>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue