Firstly, thanks to all who have replied. Here is how I got to where I am now...
Having looked at the three solutions from Jeremy, Nils and CalGuy it seemed that the easiest and most promising was the
content_dump plugin from Nils. Bearing in mind that my deadline is pretty tight I needed to get this sorted ASAP.
Having installed it, I used it in the way that Nils directed and it worked a treat. The only downside is that I only wanted to display partial content of direct children but content_dump just pushes all the way down the hierarchy, listing everything it finds. While Nils has said there are workarounds, I don't really have time to play with it so sadly I had to ditch this option (although I am looking forward to version 0.7 that will probably have this functionality in

thanks Nils!)
So I turned my attention to Jeremy's suggestion, creating a UDT (User Defined Tag) that would pull out the information I required but using the Extra Page Attribute 1 field from the options for each page, rather than a truncated content block. I followed his instructions but it didn't work. Hmm. So I checked the code and checked it against CalGuy's and saw that it included a call to the
CGSimpleSmarty module. I downloaded and installed this and it worked as Jeremy said it would. Great.
However, I then thought "Well, now I've installed the module, I'll try the solution that CalGuy suggested as he said it was really simple" (really simple are two words I like!). So I copied and pasted the code but got a fatal error. I tried it a couple of times but it didn't work so I abandoned that pretty quickly.
So this brought me back to Jeremy's solution. I tried changing it to output a truncated version of the page content block but couldn't get it to work (I think I may have mentioned that my coding skills/knowledge aren't exactly legendary) so I am doing pretty much what he suggested in the first place!
So there you go, a long, roundabout way of coming back tot he first solution that was suggested! Thanks Jeremy.
P.S. For those that like that kind of thing, here is my final code:
Code: Select all
global $gCms;
$manager =& $gCms->GetHierarchyManager();
$thisPage = $gCms->variables['page_name'];
$currentNode = &$manager->sureGetNodeByAlias($thisPage);
$nodes = $currentNode->getChildren();
if ($currentNode->hasChildren()) {
foreach ($nodes as $node) {
$content= $node->getContent();
$page_alias = $content->Alias();
$cgsimple = $smarty->get_template_vars('cgsimple');
$Sum = $cgsimple->get_page_content($page_alias, 'extra1');
$url = $content->GetURL();
if ($url == "#") { /* section header has no link by default */
$url = "index.php?page=".$content->Alias();
}
echo "<h3><a href=\"".$url."\" title=\"".$content->TitleAttribute()."\">".$content->MenuText()."</a></h3>\n";
echo "<p>".$Sum." <a href=\"".$url."\" title=\"".$content->TitleAttribute()."\">[read more...]</a></p>\n";
}