Search the Community
Showing results for tags 'select children'.
-
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
- 2 replies
-
- second navigation
- bootstrap nav
-
(and 1 more)
Tagged with:
-
Hi there, Quick question: I want to have a page field that displays only the children of the page where it's used. I can't figure out how to do this (although i'm afraid it should be quite easy)… thanks!