Hi Jac,
Assuming the three different sections are the same with the exception of the name, you could do something like this:
=======================================
<?php header('Content-type: text/html; charset=utf-8'); ?>
<?php
/* STEP 1: LOAD RECORDS - Copy this PHP code block near the TOP of your page */
// load viewer library
$libraryPath = 'cmsAdmin/lib/viewer_functions.php';
$dirsToCheck = array('C:/wamp/www/','','../','../../','../../../');
foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }
// load records from 'blog'
list($blog, $blogMetaData) = getRecords(array(
'tableName' => 'blog',
'loadUploads' => true,
'allowSearch' => false,
));
//load records from the identical test second test section.
list($news_test, $blogMetaData) = getRecords(array(
'tableName' => 'news_test',
'loadUploads' => true,
'allowSearch' => false,
));
//Merge the two arrays from the section.
$masterArray = array_merge($blog, $news_test);
//Assuming they both have a date field, sort them by that field using there unix time stamp.
$masterArray = array_groupBy($masterArray,'date:unixtime');
//Sort the new array by the date stamp.
ksort($masterArray);
======================
In this example I've combined the two sections, and then sorted them by there date field.
The limit of this method is that you won't be able to easily sort them by another field.
An easier way to do it might be to combine the three sections into one, and have a list field to select which type of news they are, this will make sorting the news stories a lot easier.
Thanks!
Greg
Greg Thomas
PHP Programmer - interactivetools.com