/ Published in: PHP
{ARTICLE_TITLE} {ARTICLE_ID} {ARTICLE_ALIAS}
{TOPLEVEL}
{PAGETITLE} = {CATEGORY} (since v1.3.5 )
{CATEGORY_ID} {CATEGORY_ALIAS}
Filename: rt_cat_article_id.php
Folder: /template/inc_script/frontend_render/
Switch: $phpwcms['allow_ext_render'] = 1; (/config/phpwcms/conf.inc.php)
{TOPLEVEL}
{PAGETITLE} = {CATEGORY} (since v1.3.5 )
{CATEGORY_ID} {CATEGORY_ALIAS}
Filename: rt_cat_article_id.php
Folder: /template/inc_script/frontend_render/
Switch: $phpwcms['allow_ext_render'] = 1; (/config/phpwcms/conf.inc.php)
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php /* ================================================================ 14.10.2008 Tags assembled by (KH) flip-flop TAG: {ARTICLE_TITLE} {ARTICLE_ID} {ARTICLE_ALIAS} {TOPLEVEL} {PAGETITLE}={CATEGORY} {CATEGORY_ID} {CATEGORY_ALIAS} Filename: rt_cat_article_id.php Folder: /template/inc_script/frontend_render/ Switch: $phpwcms['allow_ext_render'] = 1; (/config/phpwcms/conf.inc.php) Forum: http://forum.phpwcms.org/viewtopic.php?p=110038#p110038 ================================================================ */ // ---------------------------------------------------------------- // obligate check for phpwcms constants // ---------------------------------------------------------------- // {ARTICLE_TITLE} -> ARTICLE_TITLE replacement // ----------------------------------------------------- $content["all"] = str_replace('{ARTICLE_TITLE}', $GLOBALS['row']['article_title'], $content["all"]); } // {ARTICLE_ID} -> ARTICLE_ID replacement // ----------------------------------------------------- } // {ARTICLE_ALIAS} -> ARTICLE_ALIAS replacement // ----------------------------------------------------- $content["all"] = str_replace('{ARTICLE_ALIAS}', $GLOBALS['row']['article_alias'], $content["all"]); } // {TOPLEVEL} -> TOPLEVEL replacement // ----------------------------------------------------- $cur_toplevel_name = ''; $GLOBALS['nav_point_listing'] = get_breadcrumb($GLOBALS['content']["cat_id"], $GLOBALS['content']['struct']); } } // {PAGETITLE} -> PAGETITLE replacement // sinze V1.3.5 this tag is replaced default by {CATEGORY} // ----------------------------------------------------- ["acat_name"], $content["all"]); } // {CATEGORY_ID} -> CATEGORY ID replacement // ----------------------------------------------------- $content["all"] = str_replace('{CATEGORY_ID}', $GLOBALS['content']["struct"][$GLOBALS['content']["cat_id"]]["acat_id"], $content["all"]); } // {CATEGORY_ALIAS} -> CATEGORY ALIAS replacement // ----------------------------------------------------- $content["all"] = str_replace('{CATEGORY_ALIAS}', $GLOBALS['content']["struct"][$GLOBALS['content']["cat_id"]]["acat_alias"], $content["all"]); } // -----------[ CLOSE ]---------------- ?>
URL: http://forum.phpwcms.org/viewtopic.php?f=8&t=17949