shawn_a, thank you very much for this function. This is so helpful!
I use your code
and it works fantastic except for one situation: if you have only one child page I get a warning: Invalid argument supplied for foreach(). Is it possible to fix that and to show only child pages that are public and hide private pages?
Thank you for your help.
Edit: After searching the forum again, I found this solution which is what I needed:
http://get-simple.info/forums/showthread.php?tid=3081
However, thank you for your kind support.
I use your code
PHP Code:
<?php
define("IN_SUB",true);
$page = get_page_slug(false);
$children = getChildrenMulti($page,array('title','template','menuOrder'));
$childrenSorted = subval_sort($children,'menuOrder');
foreach($childrenSorted as $child) {
$template = $child['template'];
$page = $child['url'];
if($template!='template.php') include($template);
}
?>
and it works fantastic except for one situation: if you have only one child page I get a warning: Invalid argument supplied for foreach(). Is it possible to fix that and to show only child pages that are public and hide private pages?
Thank you for your help.
Edit: After searching the forum again, I found this solution which is what I needed:
http://get-simple.info/forums/showthread.php?tid=3081
However, thank you for your kind support.