The following warnings occurred:
Warning [2] Undefined array key "threadviews_countguests" - Line: 745 - File: showthread.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php 745 errorHandler->error_callback
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/inc/functions_post.php 830 postParser->parse_message
/showthread.php 916 build_postbit
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/inc/functions_post.php 861 postParser->parse_message
/showthread.php 916 build_postbit
Warning [2] Undefined property: MyLanguage::$thread_modes - Line: 46 - File: showthread.php(1650) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php(1650) : eval()'d code 46 errorHandler->error_callback
/showthread.php 1650 eval




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
sub-pages into one page
#7
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
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 )
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply


Messages In This Thread
sub-pages into one page - by Timbow - 2014-02-05, 07:52:19
RE: sub-pages into one page - by shawn_a - 2014-02-05, 08:30:03
RE: sub-pages into one page - by Timbow - 2014-02-05, 08:43:57
RE: sub-pages into one page - by shawn_a - 2014-02-05, 10:32:51
RE: sub-pages into one page - by shawn_a - 2014-02-05, 10:40:35
RE: sub-pages into one page - by shawn_a - 2014-02-05, 10:52:56
RE: sub-pages into one page - by shawn_a - 2014-02-05, 14:29:54
RE: sub-pages into one page - by Timbow - 2014-02-05, 18:24:10
RE: sub-pages into one page - by Timbow - 2014-02-20, 00:29:40
RE: sub-pages into one page - by Timbow - 2014-02-20, 02:04:31
RE: sub-pages into one page - by shawn_a - 2014-02-20, 02:40:48
RE: sub-pages into one page - by shawn_a - 2014-02-20, 02:56:43
RE: sub-pages into one page - by shawn_a - 2014-02-20, 03:12:23
RE: sub-pages into one page - by Timbow - 2014-02-20, 04:51:16
RE: sub-pages into one page - by shawn_a - 2014-02-20, 05:18:01
RE: sub-pages into one page - by Timbow - 2014-02-21, 01:15:38
RE: sub-pages into one page - by smsHH - 2017-09-29, 02:10:28



Users browsing this thread: 2 Guest(s)