2014-02-05, 14:29:54
crude but i threw this together and it seems like it would work well.
You will have to figure out how to get the subpages of subpages, like for the multi column stuff, but it should work.
at the bottom of innovation template.php i stuck this , then had 2 children with 2 different templates ( whitout headers or footers or any of that jazz )
template.php
template_sub_1.php
You also might want to have these sub pages redirect somewhere if not called via an include ( use a global to set and check )
You will have to figure out how to get the subpages of subpages, like for the multi column stuff, but it should work.
at the bottom of innovation template.php i stuck this , then had 2 children with 2 different templates ( whitout headers or footers or any of that jazz )
template.php
PHP Code:
<?php
define("IN_SUB",true);
$page = get_page_slug(false);
$children = getChildrenMulti($page,array('template'));
foreach($children as $child){
$template = $child['template'];
$page = $child['url'];
if($template!='template.php') include($template);
}
?>
template_sub_1.php
PHP Code:
<?php if(!defined('IN_GS') or !defined('IN_SUB')){ die('you cannot load this page directly.'); }
echo "<HR>".__FILE__;
echo '<h2 style="margin:10px;border:1px solid #00FFFF">TEMPLATE SUB 1</h2>';
GLOBAL $page;
getPageContent($page);
?>
You also might want to have these sub pages redirect somewhere if not called via an include ( use a global to set and check )