cjx2240 Posted February 10, 2021 Share Posted February 10, 2021 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 Link to comment Share on other sites More sharing options...
elabx Posted February 10, 2021 Share Posted February 10, 2021 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. Link to comment Share on other sites More sharing options...
cjx2240 Posted February 11, 2021 Author Share Posted February 11, 2021 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? Link to comment Share on other sites More sharing options...
elabx Posted February 11, 2021 Share Posted February 11, 2021 What about executeFor?? https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/modules/Process/ProcessPageSearch/ProcessPageSearch.module#L157 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