Jump to content

Select from all children in field using type "Page"?


alkahest
 Share

Recommended Posts

I've tried searching the forum in case this was already asked, so sorry if I'm duplicating questions here:

I want to pick a page from a dropdown so I can associate it with a content type. I created a "Page" type field, but it populates only top-level parents in the dropdown. How would you go about listing all pages and their children instead?

Link to comment
Share on other sites

Hi alkahest,

Welcome to PW! If I understand you correctly, this is determined in Setup->Fields->Input....scroll down to "Input field type". Change that to PageListSelect rather than the default "Select" and you should be good to go :). Seems with "Select" you can only select top level pages. You can still limit the page selections to children, grandchildren, etc of a particular parent using "Parent of Selectable page(s)" setting. If you want all pages, then leave that setting to "Home". Lovely site and portfolio you got there, btw..

@Ryan/Others...is this by design (haven't searched the forums ;)). I suppose it is, to avoid endless scrolling maybe?

  • Like 2
Link to comment
Share on other sites

@Ryan/Others...is this by design (haven't searched the forums  ;)). I suppose it is, to avoid endless scrolling maybe?

That's correct. Though you could bypass it by specifying your own selector for what pages should be selectable. But if you are specifying a "parent" then it's assumed you are making the children of that parent selectable. If you use an input type that supports hierarchy (PageListSelect or PageListSelectMultiple) then the parent is considered the starting point, and you can go beyond just the direct children.

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

×
×
  • Create New...