Martin1 Posted April 29, 2020 Share Posted April 29, 2020 Hi! 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 Link to comment Share on other sites More sharing options...
Martin1 Posted April 29, 2020 Author Share Posted April 29, 2020 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. 2 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