Hallo, I need a little help!
I build my first processwire website and I don't know how I can choose die pageChildren on the position 5-7
For the children 1-4 I coded for a mainnav and it works. Now I want to do this also for my topnav. But only with the children 5-7.
Code for mainnavigation:
$root = $pages->get("/");
$children = $root->children("limit=4"); // I get the first 4 pages
foreach($children as $child) {
if($child->id == wire('page')->id) {
echo "<li class='active'><a href='{$child->url}'>{$child->title}<span class='sr-only'>(current)</span></a></li>";
} else {
echo "<li><a href='{$child->url}'>{$child->title}</a></li>";
}
}
Thank you
Lena