{{indexmenu_n>320}} ====== Navi-Row replacement ====== **Certain lines of a navigation replaced by another content.** FIXME better translate With this RT you are able to replace identified rows in a navigation (NAV_LIST_UL) with specified content from the script. The cement lines or categories are determined by an entry in the field CLASS-defined in category. This is for example useful when a blank line is required in a vertical navigation. {{:deutsch:ersetzer_rts:frontend_render:navi_trenner-fe_1.gif|}} Source: \\ ---- **rt_nav_link_replace.php** V1.0 30.09.11 Docu: -- \\ Forum: [[http://forum.phpwcms.org/viewtopic.php?p=132552&sid=1263f6dc124347e334f030c268fd7840#p132552|Re: Navigations MenĂ¼]] **Author:** K.Heermann (flip-flop) http://planmatrix.de \\ **CMS Version:** >= 1.47 \\ **Version:** V1.0 \\ TAG: -- \\ filename: **rt_nav_link_replace.php** Folder: ** template/inc_script/frontend_render/ ** **Condition:** -> [[http://www.phpwcms-docu.de/conf_inc_php_en.phtml|/config/phpwcms/conf.inc.php]] \\ * $phpwcms['allow_ext_render'] = 1; ---- ---- \\ ===== Description ===== Highlight the NAVI to search in the template with the identifiers **%%%%** {NAV_LIST_UL:P,0....} //(for short runtime)// \\ View **%%ADMIN -> Site structure%%** \\ {{:english:phpwcms_replacer_rts:frontend_render:navi_trenner-admin_en_1.gif|}} Insert in **%%Site structure -> category%%** in the field **CSS class:** the name of the class, in this example: "separator". \\ //(The text in the "category title" is arbitrary and is merely for a better overview on the point ADMIN. The entry in "alias tihs category" also has no relevance, but may not be duplicated throughout the system.)// \\ {{:english:phpwcms_replacer_rts:frontend_render:navi_trenner-category12.gif|}} In Sript under %%--- CUSTOM ---%% enter the same class, in this case $class = 'separator'; \\ In Script under %%--- CUSTOM ---%% enter the replacing syntax, in this case e.g.: $replacer = '
Tzzz Tzzz
';
\\ Everything between **%%
  • %%** and the next **%%%%** will be replaced by the string from the var %%$replacer%%. ==== Example ==== From the original: wird mit dem unten angegebenen Script: \\ ===== Code ===== {NAV_LIST_UL:P,0....} - Put in the same class name in "site structure -> CSS class:" and further down in the customer area ($class). - Put in the part that is to be inserted ($replacer). Everything between
  • and the next is replaced by the Replacer ********************************************************************************/ // ----------------------------------------------------------------------------- // obligate check for phpwcms constants if (!defined('PHPWCMS_ROOT')) { die("You Cannot Access This Script Directly, Have a Nice Day.");} // ----------------------------------------------------------------------------- if (strpos($content['all'], '')) { // ------ CUSTOM --------- $class = 'separator'; $replacer = '
    Tzzz Tzzz
    '; // Catch the NAVI01 area preg_match_all('/\