Jump to content

Filter find() by pages selected in page field


elabx
 Share

Recommended Posts

I am pulling content through ajax to display a grid of images, but, the initial set of images that load when starting the site are selectable through a page field. (Each grid item is a page that works only as container).

So, in my $config->ajax I have something like this: 

$selector ='sort=title,template=featured-service|caso-exito, start=' . (int)$input->post->pagination . ', limit=6'; 
$ajaxProducts = $pages->find($selector);

Now, is there a way I can filter with not() PageArray method using data from said page field?? 

Link to comment
Share on other sites

Thanks!

I didn't out that just outputting the field as it is returned a string of the pages IDs divided by pipes. Very educational!

It ended up looking like this, no need for not()

$selector ="sort=title,template=featured-service|caso-exito, start=" . (int)$input->post->pagination . ", limit=6, id!=" . $page->featured_product_link; 
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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...