Hi Paul,
I’m trying to modify your code so that the reverse can work: when you include a certain page that has children, those children are included as well.
I have this:
if($exinclude == 'include') {
$include = $exinclude_values;
$include_elts = explode(",", $include);
$hierarchy=flexipages_get_currpage_hierarchy();
foreach ($hierarchy as $inc_page_id)
{
$include_elts=array_diff($include_elts,array($inc_page_id));
}
$include=implode(",",$include_elts);
} else
$exclude = $exinclude_values;
and I’m calling it with
flexipages('include=14,16,20&sort_column=ID&sort_order=ASC&show_subpages=1');
where 14, 16, and 20 all have 3 or more children.
I can’t seem to get it working..