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 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
List of child pages in a template
#10
All

Many thanks for your help. Here's a code snippet of what I went for in the end.

Andy

PHP Code:
if (return_page_slug() == 'blog') { 
    
$submenu=getChildren('blog'); // change to $id for current page 
    
$menuArray=array();

    foreach (
$submenu as $menuitem){
        
$menuArray[(string)$menuitem]['date']=substr(returnPageField($menuitem,'url'), 010);
        
$menuArray[(string)$menuitem]['title']=returnPageField($menuitem,'title'); 
        
$menuArray[(string)$menuitem]['url']=returnPageField($menuitem,'url');
        
$menuArray[(string)$menuitem]['description']=returnPageField($menuitem,'metad');
}   
//foreach

//Sort the array in DESC order with the date of the blog
arsort($menuArray);

foreach (
$menuArray as $value)
{
        
$strBlogTitle $value['title']; 
        
$strBlogURL $value['url'];
        
$strBlogDate date('d M Y'strtotime($value['date'])); 
        
$strBlogDescription $value['description'];

        echo 
"<div class='post'><h2><a href=" $strBlogURL ">" $strBlogTitle "</a></h2></div>";

        
// All remaining echos removed as not relevant to all


}

}   
//if

?>
Reply


Messages In This Thread
RE: List of child pages in a template - by Connie - 2013-01-09, 01:04:47
RE: List of child pages in a template - by Carlos - 2013-01-09, 17:20:13
RE: List of child pages in a template - by Connie - 2013-01-10, 03:43:21
RE: List of child pages in a template - by Carlos - 2013-01-10, 04:22:40
RE: List of child pages in a template - by Connie - 2013-01-10, 04:57:10
RE: List of child pages in a template - by D.O. - 2013-01-10, 23:23:05
RE: List of child pages in a template - by andy.storey - 2013-01-10, 23:40:13
RE: List of child pages in a template - by Connie - 2013-01-11, 18:03:45
RE: List of child pages in a template - by D.O. - 2013-01-12, 18:32:48
RE: List of child pages in a template - by Carlos - 2013-01-17, 05:20:09
RE: List of child pages in a template - by D.O. - 2013-01-17, 05:47:49
RE: List of child pages in a template - by Carlos - 2013-01-17, 05:55:02
RE: List of child pages in a template - by D.O. - 2013-01-17, 06:07:35
RE: List of child pages in a template - by Carlos - 2013-01-17, 07:01:02
RE: List of child pages in a template - by D.O. - 2013-01-17, 19:17:26



Users browsing this thread: 1 Guest(s)