Kategorie->Kategorie_ID; if(@$checkID->Kategorie->Kategorie_ID){ #print_r($checkID); $Kat=$checkID->Kategorie->Kategorie_ID; } else exit; #fehler datei nicht vorhanden... } else $Kat=getParam('Kat'); if($Kat){ # daten zur gewählen Seite auslesen $dom = new DomDocument(); $dom->preserveWhiteSpace = false; $dom->formatOutput = true; $dom->load($menue_xml_file); $xpath = new DomXPath($dom); $nodelist=$xpath->query("descendant::Kategorie_ID[. ='".$Kat."']"); $item = $nodelist->item(0)->parentNode->childNodes; $type = $nodelist->item(0)->parentNode->getAttribute('type'); $kategorie_name = $item->item(1)->textContent; $title = $item->item(8)->textContent; $meta_description = $item->item(2)->textContent; $meta_keywords = $item->item(5)->textContent; $meta_1 = $item->item(9)->textContent; $meta_2 = $item->item(10)->textContent; $inhalt = str_replace("[amp]","&",$item->item(7)->textContent); require_once($root."Smarty/libs/Smarty.class.php"); $smarty = new Smarty(); $smarty->template_dir = $root."templates"; $smarty->compile_dir = $root."Smarty/compile"; $smarty->cache_dir = $root."Smarty/cache"; $smarty->config_dir = $root."Smarty/config"; $smarty->assign('kategorie_name',$kategorie_name); $smarty->assign('title',$title); $smarty->assign('meta_description',$meta_description); $smarty->assign('meta_keywords',$meta_keywords); $smarty->assign('meta_1',$meta_1); $smarty->assign('meta_2',$meta_2); if(strstr($inhalt,'include_php')){ $smarty->assign('inhalt',str_replace('}"',"", str_replace('"{include_php file="',"",$inhalt) ) ); $smarty->assign('include',1); } else{ $smarty->assign('inhalt',$inhalt); $smarty->assign('include',0); } $smarty->display("index.tpl"); } ?>