Jump to content

Error when getting a page's children


desbest
 Share

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...