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