Hi René!
Tut mir leid, dass ich erst jetzt antworte. Ganz herzlich Dank vorab für Deine Beta-Tests. Hier eine mögliche Lösung:
<?php
$pages = read_meta_xml(NAVIGATION); // an array is returned which contains an object
// read $topnav_content for "topnav.php", "col1.php" and which content has to be displayed
$topnav_content = (isset($_GET['topnav']))
? $topnav_content = $_GET['topnav']
: $topnav_content = HOME;
if (isset($_GET['leftnav']))
{
$leftnav = $_GET['leftnav'];
}
$subpages = array();
for($i = 0; $i < count($pages); $i++)
{
$is_current = ($pages[$i]->dynamicPath == $topnav_content);
array_push(
$subpages,
array(
'main_navigation' => $pages[$i]->navigation,
'main_path' => $pages[$i]->dynamicPath,
'is_current' => $is_current,
)
);
// set $current_leftnav for TITLE-Tag or breadcrumb
if ($is_current === TRUE)
{
$current_leftnav = $pages[$i]->navigation;
}
// Plugin (e.g. "news.php") is saved if plugin (see "meta.xml") is not null
if ($pages[$i]->dynamicPath == $topnav_content and 'NULL' != $pages[$i]->plugin)
{
$plugin_file = $pages[$i]->plugin;
}
}
?>
Deine Navigation unterscheidet sich vom Standard-YAML und hat nur eine linke Navigation. Ich habe den oben geposteten Code mal ausprobiert, sollte so laufen.
Gruß
Claus
EDIT: Der PHP-Code gehört in die "col1.php" wo meistens im YAML die linke Navigation untergebracht ist.