cb2004 Posted October 5, 2017 Share 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. Link to comment Share on other sites More sharing options...
abdus Posted October 5, 2017 Share Posted October 5, 2017 $manufacturers = $pages->get("$page->rootParent")->find("pageManufacturer!=''"); // $count = $manufacturers->count; $count = $pages->count("has_parent=$page->rootParent, pageManufacturer!=''"); 1 Link to comment Share on other sites More sharing options...
cb2004 Posted October 5, 2017 Author Share 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. 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