desbest Posted April 28, 2017 Share Posted April 28, 2017 I'm using this code to get a page's children <?php //$selector = "template=chapter"; $skyscrapers = $pages->find("$page->children"); foreach($skyscrapers as $skyscraper) { echo "<li><a href='$skyscraper->url'>$skyscraper->title</a></li>"; } ?> It works on one of my pages, but when I go to another one of my pages, I get the following error Error: Exception: Unknown Selector operator: '' -- was your selector value properly escaped? (in C:\xampp\htdocs\rasarouting\wire\core\Selectors.php line 396) Both pages have children pages How do I fix this? Link to comment Share on other sites More sharing options...
Robin S Posted April 28, 2017 Share Posted April 28, 2017 To get a page's children... $skyscrapers = $page->children(); 2 Link to comment Share on other sites More sharing options...
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