Jump to content
Sign in to follow this  

Page Reference field (PageArray) doesn't return results for nested pages

Recommended Posts


I have a "company" template with a Page Reference field "sectors" which is linked to a tree of nested pages which all have a "sector" template. It is possible to link to any nested "sector" and, after selecting pages in the admin, the PageArray field doesn't seem to have knowledge of the hierarchy for the selected pages.

However, when I search companies using a subfield search ex:

$pages->find("template=company, sectors.title*=$search");

I'm only getting results of companies when I search the title of any root sectors, and I'm not getting any results when I search the title for any of the nested sectors. It seems that the PageArray field is just looking for the top sectors even though nested sectors are also selected, they all share the same "sector" template and the Page Reference field shouldn't have knowledge about the hierarchy. Is there something I'm misunderstanding?

Thank you

Share this post

Link to post
Share on other sites

Ok I get it.

The Page Reference field as a selected "Parent" to allow an easy Page List selection option, this is what affect the search here. If I remove the selected parent, only keep the template and use the AsmSelect instead, then it doesn't affect the search. It's a little less convenient to select in the admin, but I can deal with it.


  • Like 2

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...