23/02/2011, 18:50:02
J'ai trouvé la solution. Ajouter une évaluation de smarty.
Code :
global $gCms;
$smarty =& $gCms->GetSmarty();
require_once $smarty->_get_plugin_filepath('function', 'eval');
$manager =& $gCms->GetHierarchyManager();
$thisPage = $gCms->variables['page_name'];
$currentNode = &$manager->sureGetNodeByAlias($thisPage);
$nodes = $currentNode->getChildren();
if ($currentNode->hasChildren()) {
echo '<ul class="menu collapsible">';
foreach ($nodes as $node) {
$content = $node->getContent();
echo '<li><a href="'.$content->Alias().'">'.$content->MenuText().'</a>';
echo '<div class="acitem panel">'.smarty_function_eval(array('var' => $content->Show($param = 'content_en')), $smarty).'</div>';
echo '</li>';
}
echo "</ul>";
}