alejandro Posted December 1, 2013 Share Posted December 1, 2013 Hello, I don´t know if it is posible to find pages that have a children with name, I mean, something like: $parent = $pages->find("template=opciones, child.name=tarjetas") This of course doesn´t work, but something similar? Thanks in advance, Alejandro. 2 Link to comment Share on other sites More sharing options...
alejandro Posted December 1, 2013 Author Share Posted December 1, 2013 Well, I found a way. Instead os selecting parents by children fields values, first find the pages, then select the parent: $children = $pages->find("name=value"); foreach ($children as $child) { $parent = $child->parent; } Link to comment Share on other sites More sharing options...
bcartier Posted December 2, 2013 Share Posted December 2, 2013 I think you're looking for Subfield Selectors? Link to comment Share on other sites More sharing options...
alejandro Posted December 2, 2013 Author Share Posted December 2, 2013 Mmm, but I don´t see how, as the selecting field belongs to the parent´s children, not to the parent itself; and there is no method: "child.name= " or something similar. Link to comment Share on other sites More sharing options...
ryan Posted December 7, 2013 Share Posted December 7, 2013 Actually you should be able to use "children.name=tarjetas", but I tested it out here and it behaves the same as "parent.name=tarjetas", so that is a bug. Looks like this is the first instance I've seen of needing to use something other than children.count. I've now fixed it, but am doing a little more testing locally before committing to dev. 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