Hi Susan,
thanks for your answer. I now realized what I wantet with MySQL - here’s the code I’using now:
<?php
# snippet DynContentAdv v 0.1
# based on DynContent Snippet by folibis
# get content from different child docs of id $start
# even if styled different or with different templates
# sorted by menuindex
# Version 0.1 by 7media.de - July 2009
$start = $startId;
if ($items == '') $items = 10;
# Example call [!DynContentAdv? &startId=`10` &items=`10`!]
$children = $modx->db->select('*','modx_site_content','parent = '.$start.' AND published = 1','menuindex ASC','0,'.$items.'');
while ($childdoc = $modx->db->getRow($children)) {
$output = "<div class=\"fce\">";
$output .= "<h3>" . str_replace(array("[!","!]"),array(""),$childdoc['longtitle']) . "</h3>";
$output .= str_replace(array("[!","!]"),array(""),$childdoc['content']);
$output .= "</div>";
$output = $modx->parseDocumentSource($output);
$outputcombined .= $output;
}
return $outputcombined;
?>
It works fine, maybe the SELECT statement should query only selected columns. At this moment the elements are shown one below the other. One could imagine styling the div.fce or adding individual classes so that other layouts are possible. Other improvements?
So this is working as solution to FlexibleContentElements for me.