Jump to content

[SOLVED] Page Auto Complete with multiple pages from more than one parent


BFD Calendar
 Share

Recommended Posts

On an 'exhibitions' template I have a Page Auto Complete field 'works_id_list' with a multiple page array, where I can choose works that were to be seen in this exhibition. On the front page, the list of works can be seen. Most of the 'works' have the parent 'Works', but recently I want to add pages from a different parent as well. I can add them in the 'Custom find' or 'Selector string' part, and find/select them but they are not validated because they are not in the parent 'Works'. Although it says in the template part of 'selectable pages' "Select the template of the pages that are selectable. May be used instead of, or in addition to, the parent above." there seems to be no way to remove the parent, only change it to a different one. Any way to solve this?

Screenshot 2023-10-08 at 21.05.08.png

Link to comment
Share on other sites

I'd need to do a dig in my repositories but I remember doing something like this hooking into InputfieldPage::processInput and updating the parent_id property of the InputfieldPage object  before processing the page to be saved, so that it would make it valid.

Link to comment
Share on other sites

11 hours ago, BFD Calendar said:

there seems to be no way to remove the parent, only change it to a different one.

If you expand the page tree in the parent select, you should be able to click "unselect" next to the "works" page.

  • Thanks 1
Link to comment
Share on other sites

  • BFD Calendar changed the title to [SOLVED] Page Auto Complete with multiple pages from more than one parent

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...