kalimati Posted December 10, 2020 Share Posted December 10, 2020 Hi, For a Page Reference Field I would like to use filter something like this: parent=$pages->findOne("template=mag-issue, sort=-created") But I am not able to get it to work using the various options available to define selectable pages. Any idea where I could be going wrong or how to approach it. Thanks. Link to comment Share on other sites More sharing options...
elabx Posted December 10, 2020 Share Posted December 10, 2020 Setting up the template selection to mag-issue and setting the field to single display under Details tab, and the template setting under Selectable Pages under Input tab. What exactly is not working well? Watch out for hidden pages too! Link to comment Share on other sites More sharing options...
kalimati Posted December 10, 2020 Author Share Posted December 10, 2020 I want the list to consist of articles (children) in the latest issue of a magazine (parent). But it matches 0 pages! Link to comment Share on other sites More sharing options...
elabx Posted December 10, 2020 Share Posted December 10, 2020 There is also a place to put a selector string right bellow that custom find option, try this selector (hope im understanding your issue correctly): parent.template=mag-issuse, template=article, sort=-created Link to comment Share on other sites More sharing options...
kalimati Posted December 11, 2020 Author Share Posted December 11, 2020 The site is structured this way: mag-issue1 - article1 - article2 - article3 ... mag-issue2 - article1 - article2 - article3 ... mag-issue3 - article1 - article2 - article3 ... ... The idea is to select the children of the latest mag-issue as the selectable pages for the page reference field. 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