Hi,
i need some help with the navigation menu. How can i add a link to an anchor?
I used this to display my sites. The menu renders fine. After the second entry i would link to screen2. How can i do that?
<?php
include("./head.php"); ?>
<body>
<section id="screen1">text
<nav>
<ul>
<?php
// top navigation consists of homepage and its visible children
$homepage = $pages->get('/');
$children = $homepage->children();
// make 'home' the first item in the navigation
$children->prepend($homepage);
// render an <li> for each top navigation item
foreach($children as $child) {
if($child->id == $page->rootParent->id) {
// this $child page is currently being viewed (or one of it's children/descendents)
// so we highlight it as the current page in the navigation
echo "<li class='current'><a href='$child->url'>$child->title</a></li>";
} else {
echo "<li><a href='$child->url'>$child->title</a></li>";}}
// output an "Edit" link if this page happens to be editable by the current user
if($page->editable()) {
echo "<li class='edit'><a href='$page->editUrl'>Seite bearbeiten</a></li>"; }?>
</ul>
</nav>
</section>
<section id="screen2"></section>
<?php include("./footer.php"); ?>