Jump to content
cjx2240

Hook into selectable pages for InputfieldPageAutocomplete

Recommended Posts

I'm hooking into 

InputfieldPage::getSelectablePages

In order to limit the results to a certain parent, on a multi-site setup. This works great.

However I can't seem to do the same thing for an ASM Autocomplete style field.

Does anyone know how I would go about this?

Thanks

Share this post


Link to post
Share on other sites

If I remember correctly this wasn't working like expected due to Autocomplete using ProcessPageSearch. This github issue have some info and code that could be useful.

Share this post


Link to post
Share on other sites

Thanks for the suggestion, I will look into that. The suggestion to hook into pages::find seems useful, but is that advisable? Surely pages::find is happening a lot throughout the site, don't want to go slowing the site down (forgive me if I'm displaying some ignorance on how hooks work)

On a similar note, I have ticked for this field "allow unpublished pages" which works for superusers, but not a secondary manager role I've set up (even though again, it works for regular InputfieldPage fields), any ideas what permission needs giving?

Share this post


Link to post
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

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...