// 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"]); // Table based navigation, outdated if (strpos($content["all"], '{NAV_TABLE') !== false) { $content["all"] = str_replace('{NAV_TABLE_SIMPLE}', nav_table_simple_struct($content["struct"], $content["cat_id"]), $content["all"]); $content["all"] = str_replace('{NAV_TABLE_COLUMN}', '{NAV_TABLE_COLUMN:0}', $content["all"]); $content["all"] = preg_replace_callback('/\\{NAV_TABLE_COLUMN:(\\d+)\\}/', 'nav_table_struct_callback', $content["all"]); } }
function css_level_list_top_callback($matches) { return css_level_list($GLOBALS['content']["struct"], $GLOBALS['content']["cat_path"], 0, $matches[1], 1, $matches[2]); }