cb2004 Posted October 5, 2017 Posted October 5, 2017 So I am finding the pages from a given rootparent that have a manufacturer assigned, I then turn this into a unique array to display logos, but how would I count this first? $pages->count("???"); Cheers.
abdus Posted October 5, 2017 Posted October 5, 2017 $manufacturers = $pages->get("$page->rootParent")->find("pageManufacturer!=''"); // $count = $manufacturers->count; $count = $pages->count("has_parent=$page->rootParent, pageManufacturer!=''"); 1
cb2004 Posted October 5, 2017 Author Posted October 5, 2017 Thanks so much @abdus. Sometimes my brain freezes up with all the selector stuff. Thats a nice optimisation for my site.
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