Jump to content

Autocomplete input for page select


dhruba
 Share

Recommended Posts

It works but I want It to use in my client page(not in admin). and it returns only children pages but I need all grandchildren pages.

Items

  cetegory1

            item1

            item2

 cetegory2

            item3

            item4

I need item1,item2,item3,item4 in my autocomplete list Thanks.

Link to comment
Share on other sites

You can set up customs selectors or even PHP code for page fields.

I don't think there's a selector for this case so you might want to add PHP code that collects all grand children and returns it in a new PageArray:

$rtnPages = new PageArray();

foreach ($pages->get("/items/")->children as $categories) {
    $rtnPages->append($categories->children);
}

return $rtnPages;

Or if your items in the categories have a certain template you can select by template: template=template-name

  • Like 4
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...