tooth-paste Posted February 10, 2017 Posted February 10, 2017 I really need some help on this one. I run into a total mystery. I've been working on it all day and tried everything. The problem is that I can NOT SHOW ANY TITLES of CHILDREN. Titles of the root tree show up fine. Also when I replace title with url, all url's of children are visible. I'am testing with this simple piece of code. <nav> <?php $child_pages = $pages->get("/webshop/")->children; foreach ($child_pages as $child) { echo '<a href="'. $child->url .'">'. $child->title .'</a><br />'; } ?> </nav>
bernhard Posted February 10, 2017 Posted February 10, 2017 do those pages have a title field? maybe you removed it? in the pagetree you wouldn't realize it because it would show the page name. try a tracy console like $child = $pages->get(_your_childpage_id_); d($child->id); d($child->title); 5
tooth-paste Posted February 10, 2017 Author Posted February 10, 2017 THX, empty title field was the reason.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now