Jump to content

Recommended Posts

Posted
<?$work_pages = new PageArray();?>

<?$project_1 = $pages->get("parent=/work/projects, limit=1, sort=sort");
$work_pages->add($project_1);
// Code for Project 1 goes here

$project_2 = $pages->get("parent=/work/projects, id!=$work_pages, limit=1, sort=sort");
$work_pages->add($project_2);
// Code for Project 2 goes here

$project_3 = $pages->get("parent=/work/projects, id!=$work_pages, limit=1, sort=sort");
$work_pages->add($project_3);
// Code for Project 3 goes here
// etc

I have the above code which gets project pages then adds the project to an array to exclude from the next selector.

I'm sure this was working fine but seems to have started including unpublished pages - if I unpublish or hide pages they still show up. I've done some troubleshooting and have excluded any caching issues - the code is definitely pulling in unpublished pages.

Working on Processwire 2.8.35

 

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
×
×
  • Create New...