dhruba Posted August 24, 2013 Posted August 24, 2013 Hi Is there any easy method to use autocomplete input text field to select a page in client pages for FieldTypePage.
landitus Posted August 24, 2013 Posted August 24, 2013 Yes there is! Take a look at your modules page in the admin and activate the Page Auto Complete module! Then, set up a new field and set it up as a Page type and the input to use the new auto complete field. 1
dhruba Posted August 24, 2013 Author Posted August 24, 2013 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.
owzim Posted August 25, 2013 Posted August 25, 2013 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 4
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