{{indexmenu_n>16}} ====== {XBROWSE:UP:LinkText} ====== Different Browse UP for category/article-view in simple or listing article mode. -> [[english/phpwcms-system/article#display_modes|Display modes]]\\ - Browse up to the category //(article listing)// if the user is in article detail view //(article listing mode set)//. \\ - Browse up to the parent category if the user is in article detail view //(simple article mode)// or category view. This tag can alternatively be used for the built-in [[http://www.phpwcms-docu.de/navigation_tags.phtml|{BROWSE:UP:LinkText}]]. Please do not use this tag parallel with [[english/phpwcms_replacer_rts/frontend_render/xbrowse-next-prev-up]] //(There it is integrated).// ---- \\ **rt_xbrowse_up** V1.0/V1.1 14.03.2010 Docu: -- \\ Forum: [[http://forum.phpwcms.org/viewtopic.php?f=16&t=19936]] **Author:** K.Heermann (flip-flop) http://planmatrix.de \\ **CMS Version:** >= 1.3 \\ **Version:** V1.0 \\ **Version:** V1.1 recommended :!: \\ Tag: {**XBROWSE:UP:LinkText}** \\ Filename: **rt_xbrowse_up.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; ---- ---- \\ ==== Code V1.1: ==== **V1.1 recommended :!:: \\ ** Faster processing without function call and $GLOBALS, "LinkText" must be available %%''{XBROWSE:UP:LinkText}''%%. $1'; // Only if not home cat // Nur wenn nicht Home Kategorie // if ($content['cat_id'] == 0 ) $link = ''; $content["all"] = preg_replace('/\{XBROWSE:UP:(.+?)\}/', $link, $content["all"]); // In category view if simple article- or listing mode set // In der Kategorie bei einfachem & Artikellisten-Modus } else { // Only if not home cat // Nur wenn nicht Home Kategorie // if ($content['cat_id'] == 0 ) $content["all"] = preg_replace('/\{XBROWSE:UP:(.+?)\}/','',$content["all"]); $content["all"] = preg_replace('/\{XBROWSE:UP:(.+?)\}/e','get_index_link_up("$1");',$content["all"]); } } ?> Optionally exclude the Home category, see 2x **''%%if ($content['cat_id'] == 0 ) ....;%%''** \\ \\ ==== Code V1.0: ==== '.$linktext['1'].''; // In category view if simple article- or listing mode set // In der Kategorie bei einfachem & Artikellisten-Modus } else { // Jump to parent category // gehe zur Eltern-Kategorie $link = get_index_link_up($linktext['1']); } return $link; // Only if not home cat // Nur wenn nicht Home Kategorie // return (($GLOBALS['content']['cat_id']) > 0 ) ? $link :''; } $content["all"] = preg_replace_callback('/\{XBROWSE:UP:(.*?)\}/','x_get_index_link_up',$content["all"]); } ?> Optionally exclude the Home category, see **return ....;** \\