$content["all"] = render_PHPcode($content["all"]); //breadcrumb replacement if (strpos($content["all"], '{BREADCRUMB') !== false) { $content['all'] = preg_replace_callback('/\\{BREADCRUMB:?(\\-?\\d+){0,1}\\}/', 'breadcrumb_wrapper', $content['all']); } // ul/li based navigation, the default one if (strpos($content["all"], '{NAV_LIST_UL') !== false) { // build complete menu structure starting at a specific ID // {NAV_LIST_UL:Parameter} Parameter: "menu_type, start_id, class_path, class_active, ul_id_name" $content["all"] = preg_replace_callback('/\\{NAV_LIST_UL:(.*?)\\}/', 'buildCascadingMenu', $content["all"]); } // some more navigations, do not use - not recommend any longer, need deprecated config enabled if ($phpwcms['enable_deprecated']) { if (strpos($content["all"], '{NAV_') !== false) { // Simple row based navigation $content["all"] = str_replace('{NAV_ROW}', nav_level_row(0), $content["all"]); $content["all"] = preg_replace_callback('/\\{NAV_ROW:(\\w+|\\d+):(0|1)\\}/', 'nav_level_row', $content["all"]); //reads all active category IDs beginning with the current cat ID - without HOME $content["cat_path"] = get_active_categories($content["struct"], $content["cat_id"]); // some general list replacements first $content["all"] = str_replace('{NAV_LIST}', '{NAV_LIST:0}', $content["all"]); $content["all"] = str_replace('{NAV_LIST_TOP}', css_level_list($content["struct"], $content["cat_path"], 0, '', 1), $content["all"]); $content["all"] = str_replace('{NAV_LIST_CURRENT}', css_level_list($content["struct"], $content["cat_path"], $content["cat_id"]), $content["all"]); // list based navigation starting at given level $content["all"] = preg_replace_callback('/\\{NAV_LIST:(\\d+):{0,1}(.*){0,1}\\}/', 'nav_list_struct_callback', $content["all"]); // List based navigation with Top Level - default settings // creates a list styled top nav menu, + optional Home | {NAV_LIST_TOP:home_name:class_name} | default class name = list_top $content["all"] = preg_replace_callback('/\\{NAV_LIST_TOP:(.*?):(.*?)\\}/', 'css_level_list_top_callback', $content["all"]); // List based navigation with Top Level - default settings // creates a list styled nav menu of current level {NAV_LIST_CURRENT:1:back_name:class_name} | default class name = list_top $content["all"] = preg_replace_callback('/\\{NAV_LIST_CURRENT:(\\d+):(.*?):(.*?)\\}/', 'css_level_list_current_callback', $content["all"]);
foreach ($LEVEL_ID as $depth => $thisStructureID) { switch ($depth) { case 0: // Top Level $template_default["nav_row"]["before"] = '<ul class="levelClass0">'; $complexNav .= nav_level_row($thisStructureID, 0); break; case 1: // 1st Level $template_default["nav_row"]["before"] = '<ul class="levelClass1">'; $complexNav .= nav_level_row($thisStructureID, 0); break; case 2: // 2nd Level $template_default["nav_row"]["before"] = '<ul class="levelClass2">'; $complexNav .= nav_level_row($thisStructureID, 0); break; case 3: // 3rd Level $template_default["nav_row"]["before"] = '<ul class="levelClass3">'; $complexNav .= nav_level_row($thisStructureID, 0); break; case 4: // 4th Level $template_default["nav_row"]["before"] = '<ul class="levelClass4">'; $complexNav .= nav_level_row($thisStructureID, 0); break; } } $content["all"] = str_replace('{MY_LEVEL_NAV}', $complexNav, $content["all"]); }