Jump to content

Page Selector Filter


999design
 Share

Recommended Posts

Hi Guys,

I wanted to find all pages which are children of the current page:

$rootPage = $page->children();

But I then want to filter out all pages of a few different templates:

$rootPage = $page->children('template!=cta-block|puffs-block|table-block');

But also filter out one specific template called company when the pages website textbox has no value:

$rootPage = $page->children('template!=cta-block|puffs-block|table-block')->not('template=company, website=');

This doesn't work - I have tried a few different variations, but can't get it right.

Anybody point out where I am going wrong?

Thanks,

Craig

Link to comment
Share on other sites

Or maybe something like:

$first = $page->children("template!=cta-block|puffs-block|table-block");
$second = $first->not("template=company, website=''");

// That is the verbose version of what you have done before, and a slightly change on parenthesis.

Written in a hurry :)

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...