Standard tags assembled

Docu: –
Forum:
{ARTICLE([TITLE][SUBTITLE][ID][ALIAS])} {CATEGORY([ID][ALIAS])} {PARENT_CATEGORY([ID][ALIAS])}


Author: K.Heermann (flip-flop) http://planmatrix.de 2009/01/23 16:16
CMS Version: >= V1.39

Version: V1.1, Update: V1.11 (19.03.2010 KH)(23.06.2010 KH)
Update: V1.2 (11.10.2009 KH), V1.21 (19.03.2010 KH)(23.06.2010 KH)
Update: V1.3 (11.10.2009 KH), V1.31 (19.03.2010 KH)(23.06.2010 KH)
Update: V1.4 (13.10.2009 KH), V1.41 (19.03.2010 KH)(23.06.2010 KH)

Update: all versions: (10.12.2009 KH)
{ARTICLE_TITLE}: $row['article_title'] → $content['article_title']
{ARTICLE_ID}: $row['article_id'] → $content['article_id']
{ARTICLE_ALIAS}: $row['article_alias']
→ $content['articles'][$content['article_id']]['article_alias']
{ARTICLE_SUBTITLE}: added

Update: all versions to 1.x1: (19.03.2010 KH)
+ {CATEGORY_GO:ID} → with given ID: link to category with category title link text

Update: all versions (28.06.2011 KH)
+ {CATEGORY_CLASS} → custom class name of the active structure level

Tag V1.41:
{ARTICLE_([TITLE][SUBTITLE][ID][ALIAS])}
{TOPLEVEL_([ALIAS])}
{CATEGORY_([ID][ALIAS][GO:ID][CLASS])}
{PARENT_CATEGORY_([ID][ALIAS][TITLE])}
[(/)LEVEL_START:S:E]


  • {ARTICLE_TITLE}
  • {ARTICLE_SUBTITLE}
  • {ARTICLE_ID} since V1.4.2 r316 (09/06/24) this tag is replaced default by {CURRENT_ARTICLEID}
  • {ARTICLE_ALIAS}
  • {TOPLEVEL}
  • {TOPLEVEL_ALIAS}
  • {PAGETITLE} : since V1.3.5 this tag is replaced default by {CATEGORY}
  • {CATEGORY_ID} since V1.4.2 r316 (09/06/24) this tag is replaced default by {CURRENT_CATEGORYID}
  • {CATEGORY_ALIAS}
  • {CATEGORY_GO:ID}
  • {CATEGORY_CLASS} since V1.4.7 r403 (10/11/02) custom class name of the active structure level
  • {PARENT_CATEGORY_ID}
  • {PARENT_CATEGORY_ALIAS}
  • {PARENT_CATEGORY_TITLE}
  • [NOT_AT_HOME]. . . . .[/NOT_AT_HOME] (between the tags: render all other categories than “home” (cat > 0))
  • [LEVEL_START:StartLevel:EndLevel]. . . . .[/LEVEL_START] (between the tags: render all categories than (cat < StartLevel AND cat > EndLevel))


Filename: rt_cat_article_id.php

Folder: /template/inc_script/frontend_render/

Condition: $phpwcms['allow_ext_render'] = 1;/config/phpwcms/conf.inc.php




Snippets

Updated in all version 23.06.2010 KH.

Article subtitle:

$article_id = $content['article_id'];
$content['articles'][$article_id]['article_subtitle'];


V1.11

Tag:
{ARTICLE_([TITLE][SUBTITLE][ID][ALIAS])} {CATEGORY_([ID][ALIAS][GO:ID][CLASS])}

{ARTICLE_([TITLE][SUBTITLE][ID][ALIAS])} {CATEGORY_([ID][ALIAS][GO:ID][CLASS])}

<?php
/******************************************************************
V1.1
14.10.2008 Tags assembled by (KH) flip-flop
26.01.2009 Update +  {TOPLEVEL_ALIAS}
10.12.2009 Update =  Change var $row['... to  $content['...
V1.11
19.03.2010 Update +  {CATEGORY_GO:ID}
-> with given ID: link to category with category title link text
23.06.2010 Update +  {ARTICLE_SUBTITLE}
28.06.2011 Update +  {CATEGORY_CLASS}
 
TAG:
{ARTICLE_TITLE}
{ARTICLE_SUBTITLE}
{ARTICLE_ID} = {CURRENT_ARTICLEID} (since v1.4.2 r316 (09/06/24))
{ARTICLE_ALIAS}
{TOPLEVEL} {TOPLEVEL_ALIAS}
{PAGETITLE} = {CATEGORY} (since v1.3.5 )
{CATEGORY_ID} = {CURRENT_ARTICLEID} (since v1.4.2 r316 (09/06/24))
{CATEGORY_ALIAS}
{CATEGORY_GO:ID}
{CATEGORY_CLASS}  (since v1.4.7 r403 (10/11/01) custom class name of the active structure level)
 
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
if (!defined('PHPWCMS_ROOT')) {
   die("You Cannot Access This Script Directly, Have a Nice Day."); }
// ----------------------------------------------------------------
 
 
// {ARTICLE_ replacement
/
 
 =======================================================
if( ! (strpos($content["all"],'{ARTICLE_')===false)) {
 
    // {ARTICLE_TITLE}  -> ARTICLE_TITLE replacement
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{ARTICLE_TITLE}')===false)) {
       $content["all"] = str_replace('{ARTICLE_TITLE}', $content['article_title'], $content["all"]);
    }
 
    // {ARTICLE_SUBTITLE}  -> ARTICLE_SUBTITLE replacement
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{ARTICLE_SUBTITLE}')===false)) {
       $content["all"] = str_replace('{ARTICLE_SUBTITLE}', $content['articles'][$content['article_id']]['article_subtitle'], $content["all"]);
    }
 
    // {ARTICLE_ID}  -> ARTICLE_ID replacement
    // since V1.4.2 r316 (09/06/24) this tag is replaced default by **{CURRENT_ARTICLEID}**
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{ARTICLE_ID}')===false)) {
       $content["all"] = str_replace('{ARTICLE_ID}', $content['article_id'], $content["all"]);
    }
 
    // {ARTICLE_ALIAS}  -> ARTICLE_ALIAS replacement
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{ARTICLE_ALIAS}')===false)) {
       $content["all"] = str_replace('{ARTICLE_ALIAS}', $content['articles'][$content['article_id']]['article_alias'], $content["all"]);
    }
}
 
// {TOPLEVEL replacement
// =======================================================
if( ! (strpos($content["all"],'{TOPLEVEL')===false)) {
 
    // {TOPLEVEL}  -> TOPLEVEL replacement
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{TOPLEVEL}')===false)) {
 
    $cur_toplevel_name = '';
    $nav_point_listing = get_breadcrumb($content["cat_id"], $content['struct']);
 
    if(isset($nav_point_listing) && count($nav_point_listing) > 1) {
        reset($nav_point_listing);
        next($nav_point_listing);
        $cur_toplevel_name = html_specialchars($content['struct'][ intval(key($nav_point_listing)) ]['acat_name']);
    }
    $content['all'] = str_replace('{TOPLEVEL}', $cur_toplevel_name, $content['all']);
    }
 
    // {TOPLEVEL_ALIAS}  -> TOPLEVEL ALIAS replacement
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{TOPLEVEL_ALIAS}')===false)) {
 
    $cur_toplevel_alias = '';
    $nav_point_listing = get_breadcrumb($content["cat_id"], $content['struct']);
 
    if(isset($nav_point_listing) && count($nav_point_listing) > 1) {
        reset($nav_point_listing);
        next($nav_point_listing);
        $cur_toplevel_alias = html_specialchars($content['struct'][ intval(key($nav_point_listing)) ]['acat_alias']);
    }
    $content['all'] = str_replace('{TOPLEVEL_ALIAS}', $cur_toplevel_alias, $content['all']);
    }
 
}
 
 
// {PAGETITLE}  -> PAGETITLE replacement
// since V1.3.5 this tag is replaced default by {CATEGORY}
// -----------------------------------------------------
if( ! (strpos($content["all"],'{PAGETITLE}')===false)) {
   $content["all"] = str_replace('{PAGETITLE}', $content["struct"][$content["cat_id"]]
["acat_name"], $content["all"]);
}
 
 
// {CATEGORY_ replacement
// =======================================================
if( ! (strpos($content["all"],'{CATEGORY_')===false)) {
 
    // {CATEGORY_ID}  -> CATEGORY ID replacement
    // since V1.4.2 r316 (09/06/24) this tag is replaced default by **{CURRENT_CATEGORYID}**
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{CATEGORY_ID}')===false)) {
        $content["all"] = str_replace('{CATEGORY_ID}', $content["struct"][$content["cat_id"]]["acat_id"], $content["all"]);
    }
 
    // {CATEGORY_ALIAS}  -> CATEGORY ALIAS replacement
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{CATEGORY_ALIAS}')===false)) {
    $content["all"] = str_replace('{CATEGORY_ALIAS}', $content["struct"][$content["cat_id"]]["acat_alias"], $content["all"]);
    }
 
    // {CATEGORY_GO:ID}  -> CATEGORY link to cat-ID replacement
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{CATEGORY_GO:')===false)) {
 
        function category_link($id) {
        /**
         * @param:    array    $id[1]=cat-id
         * @return:    complete link to category with category title link text
         **/
            return '<a href="index.php?id='.$id[1].'" class="phpwcmsIntLink">'.
                    $GLOBALS['content']["struct"][$id[1]]["acat_name"].
                    '</a>';
        }
 
        if( ! (strpos($content["all"],'{CATEGORY_GO:')===false)) {
            $content["all"] = preg_replace_callback('/{CATEGORY_GO:(\d+)}/s', 'category_link', $content["all"]);
        }
    }
 
    // {CATEGORY_CLASS}  -> CATEGORY CLASS replacement
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{CATEGORY_CLASS}')===false)) {
        $content["all"] = str_replace('{CATEGORY_CLASS}', $content["struct"][$content["cat_id"]]["acat_class"], $content["all"]);
    }
 
}
// -----------[ CLOSE ]----------------
?>

UPDATE: 26.01.09 (KH) –> added {TOPLEVEL_ALIAS}

V1.11
UPDATE: 19.03.10 (KH) –> added {CATEGORY_GO:ID} (with given ID: link to category with category title link text)
UPDATE: 23.06.10 (KH) –> added {ARTICLE_SUBTITLE}
UPDATE: 28.06.11 (KH) –> added {CATEGORY_CLASS} (custom class name of the active structure level)

quod vide example 5 and example 6


V1.21

Tag:
{ARTICLE_([TITLE][SUBTITLE][ID][ALIAS])} {CATEGORY_([ID][ALIAS][GO:ID][CLASS])} {PARENT_CATEGORY_([ID][ALIAS])}

{ARTICLE_([TITLE][SUBTITLE][ID][ALIAS])} {CATEGORY_([ID][ALIAS][GO:ID][CLASS])} {PARENT_CATEGORY_([ID][ALIAS])}

<?php
/******************************************************************
V1.2
14.10.2008 Tags assembled by (KH) flip-flop
26.01.2009 Update +  {TOPLEVEL_ALIAS}
11.10.2009 Update +  {PARENT_CATEGORY_ID}, {PARENT_CATEGORY_ALIAS}
           Update - kill  "$GLOBALS", we don´t need it
10.12.2009 Update =  Change var $row['... to  $content['...
V1.21
19.03.2010 Update +  {CATEGORY_GO:ID}
-> with given ID: link to category with category title link text
23.06.2010 Update +  {ARTICLE_SUBTITLE}
28.06.2011 Update +  {CATEGORY_CLASS}
 
TAG:
{ARTICLE_TITLE} {ARTICLE_SUBTITLE} {ARTICLE_ID} {ARTICLE_ALIAS}
{TOPLEVEL} {TOPLEVEL_ALIAS}
{PAGETITLE} = {CATEGORY} (since v1.3.5 )
{CATEGORY_ID} {CATEGORY_ALIAS} {CATEGORY_GO:ID}
{CATEGORY_CLASS}  (since v1.4.7 r403 (10/11/01) custom class name of the active structure level)
{PARENT_CATEGORY_ID} {PARENT_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
if (!defined('PHPWCMS_ROOT')) {
   die("You Cannot Access This Script Directly, Have a Nice Day."); }
// ----------------------------------------------------------------
 
 
// {ARTICLE_ replacement
// =======================================================
if( ! (strpos($content["all"],'{ARTICLE_')===false)) {
 
    // {ARTICLE_TITLE}  -> ARTICLE_TITLE replacement
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{ARTICLE_TITLE}')===false)) {
       $content["all"] = str_replace('{ARTICLE_TITLE}', $content['article_title'], $content["all"]);
    }
 
    // {ARTICLE_SUBTITLE}  -> ARTICLE_SUBTITLE replacement
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{ARTICLE_SUBTITLE}')===false)) {
       $content["all"] = str_replace('{ARTICLE_SUBTITLE}', $content['articles'][$content['article_id']]['article_subtitle'], $content["all"]);
    }
 
    // {ARTICLE_ID}  -> ARTICLE_ID replacement
    // since V1.4.2 r316 (09/06/24) this tag is replaced default by **{CURRENT_ARTICLEID}**
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{ARTICLE_ID}')===false)) {
       $content["all"] = str_replace('{ARTICLE_ID}', $content['article_id'], $content["all"]);
    }
 
    // {ARTICLE_ALIAS}  -> ARTICLE_ALIAS replacement
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{ARTICLE_ALIAS}')===false)) {
       $content["all"] = str_replace('{ARTICLE_ALIAS}', $content['articles'][$content['article_id']]['article_alias'], $content["all"]);
    }
}
 
// {TOPLEVEL replacement
// =======================================================
if( ! (strpos($content["all"],'{TOPLEVEL')===false)) {
 
    // {TOPLEVEL}  -> TOPLEVEL replacement
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{TOPLEVEL}')===false)) {
 
    $cur_toplevel_name = '';
    $nav_point_listing = get_breadcrumb($content["cat_id"], $content['struct']);
 
        if(isset($nav_point_listing) && count($nav_point_listing) > 1) {
           reset($nav_point_listing);
           next($nav_point_listing);
           $cur_toplevel_name = html_specialchars($content['struct'][ intval(key($nav_point_listing)) ]['acat_name']);
        }
    $content['all'] = str_replace('{TOPLEVEL}', $cur_toplevel_name, $content['all']);
    }
    // -----------------------------------------------------
 
 
    // {TOPLEVEL_ALIAS}  -> TOPLEVEL ALIAS replacement
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{TOPLEVEL_ALIAS}')===false)) {
 
    $cur_toplevel_alias = '';
    $nav_point_listing = get_breadcrumb($content["cat_id"], $content['struct']);
 
    if(isset($nav_point_listing) && count($nav_point_listing) > 1) {
       reset($nav_point_listing);
       next($nav_point_listing);
       $cur_toplevel_alias = html_specialchars($content['struct'][ intval(key($nav_point_listing)) ]['acat_alias']);
    }
    $content['all'] = str_replace('{TOPLEVEL_ALIAS}', $cur_toplevel_alias, $content['all']);
    }
// -------------------------------------------------------
}
 
 
 
// {PAGETITLE}  -> PAGETITLE replacement
// since V1.3.5 this tag is replaced default by {CATEGORY}
// =======================================================
if( ! (strpos($content["all"],'{PAGETITLE}')===false)) {
   $content["all"] = str_replace('{PAGETITLE}', $content["struct"][$content["cat_id"]]["acat_name"], $content["all"]);
}
 
 
// {CATEGORY_ replacement
// =======================================================
if( ! (strpos($content["all"],'{CATEGORY_')===false)) {
 
    // {CATEGORY_ID}  -> CATEGORY ID replacement
    // since V1.4.2 r316 (09/06/24) this tag is replaced default by **{CURRENT_CATEGORYID}**
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{CATEGORY_ID}')===false)) {
        $content["all"] = str_replace('{CATEGORY_ID}', $content["struct"][$content["cat_id"]]["acat_id"], $content["all"]);
    }
 
    // {CATEGORY_ALIAS}  -> CATEGORY ALIAS replacement
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{CATEGORY_ALIAS}')===false)) {
        $content["all"] = str_replace('{CATEGORY_ALIAS}', $content["struct"][$content["cat_id"]]["acat_alias"], $content["all"]);
    }
 
    // {CATEGORY_GO:ID}  -> CATEGORY link to cat-ID replacement
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{CATEGORY_GO:')===false)) {
 
        function category_link($id) {
        /**
         * @param:    array    $id[1]=cat-id
         * @return:    complete link to category with category title link text
         **/
            return '<a href="index.php?id='.$id[1].'" class="phpwcmsIntLink">'.
                    $GLOBALS['content']["struct"][$id[1]]["acat_name"].
                    '</a>';
        }
 
        if( ! (strpos($content["all"],'{CATEGORY_GO:')===false)) {
            $content["all"] = preg_replace_callback('/{CATEGORY_GO:(\d+)}/s', 'category_link', $content["all"]);
        }
    }
 
}
 
 
// {PARENT_CATEGORY_ replacement
// =======================================================
 
    // {PARENT_CATEGORY_ID}  -> PARENT_CATEGORY replacement
    // -----------------------------------------------------
if( ! (strpos($content["all"],'{PARENT_CATEGORY_')===false)) {
    // {PARENT_CATEGORY_ID}  -> PARENT_CATEGORY ID replacement
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{PARENT_CATEGORY_ID}')===false)) {
       $content["all"] = str_replace('{PARENT_CATEGORY_ID}',
       $content["struct"][$content["cat_id"]]["acat_struct"],
       $content["all"]);
    }
 
    // {PARENT_CATEGORY_ALIAS}  -> PARENT_CATEGORY ALIAS replacement
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{PARENT_CATEGORY_ALIAS}')===false)) {
       $content["all"] = str_replace('{PARENT_CATEGORY_ALIAS}',
       $content["struct"][$content["struct"][$content["cat_id"]]["acat_struct"]]["acat_alias"],
       $content["all"]);
    }
 
    // {CATEGORY_CLASS}  -> CATEGORY CLASS replacement
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{CATEGORY_CLASS}')===false)) {
        $content["all"] = str_replace('{CATEGORY_CLASS}', $content["struct"][$content["cat_id"]]["acat_class"], $content["all"]);
    }
 
}
 
 
// -----------[ CLOSE ]----------------
?>

UPDATE: 26.01.09 (KH) –> added {TOPLEVEL_ALIAS}
UPDATE: 11.10.09 (KH) –> added {PARENT_CATEGORY_ID} {PARENT_CATEGORY_ALIAS}; kill all “$GLOBALS”, we don´t need it.

V1.21
UPDATE: 19.03.10 (KH) –> added {CATEGORY_GO:ID} (with given ID: link to category with category title link text)
UPDATE: 23.06.10 (KH) –> added {ARTICLE_SUBTITLE}
UPDATE: 28.06.11 (KH) –> added {CATEGORY_CLASS} (custom class name of the active structure level)

quod vide example 5 and example 6


V1.31

Tag:
{ARTICLE_([TITLE][SUBTITLE][ID][ALIAS])} {CATEGORY_([ID][ALIAS][GO:ID][CLASS])} {PARENT_CATEGORY_([ID][ALIAS])} [(/)NOT_AT_HOME]

{ARTICLE_([TITLE][SUBTITLE][ID][ALIAS])} {CATEGORY_([ID][ALIAS][GO:ID][CLASS])} {PARENT_CATEGORY_([ID][ALIAS])} [[/]NOT_AT_HOME]

<?php
/******************************************************************
V1.3
14.10.2008 Tags assembled by (KH) flip-flop
26.01.2009 Update +  {TOPLEVEL_ALIAS}
11.10.2009 Update +  {PARENT_CATEGORYY_ID}, {PARENT_CATEGORYY_ALIAS}
           Update - kill  "$GLOBALS", we don´t need it
           Update + [NOT_AT_HOME].....[/NOT_AT_HOME] (render tags (cat >0))
10.12.2009 Update =  Change var $row['... to  $content['...
V1.31
19.03.2010 Update +  {CATEGORY_GO:ID}
-> with given ID: link to category with category title link text
23.06.2010 Update +  {ARTICLE_SUBTITLE}
28.06.2011 Update +  {CATEGORY_CLASS}
 
TAG:
{ARTICLE_TITLE} {ARTICLE_SUBTITLE} {ARTICLE_ID} {ARTICLE_ALIAS}
{TOPLEVEL} {TOPLEVEL_ALIAS}
{PAGETITLE} = {CATEGORY} (since v1.3.5 )
{CATEGORY_ID} {CATEGORY_ALIAS} {CATEGORY_GO:ID}
{CATEGORY_CLASS}  (since v1.4.7 r403 (10/11/01) custom class name of the active structure level)
{PARENT_CATEGORYY_ID} {PARENT_CATEGORYY_ALIAS}
[NOT_AT_HOME].....[/NOT_AT_HOME] (only rendered if category > 0)
 
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
if (!defined('PHPWCMS_ROOT')) {
   die("You Cannot Access This Script Directly, Have a Nice Day."); }
// ----------------------------------------------------------------
 
 
// {ARTICLE_ replacement
// =======================================================
if( ! (strpos($content["all"],'{ARTICLE_')===false)) {
 
    // {ARTICLE_TITLE}  -> ARTICLE_TITLE replacement
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{ARTICLE_TITLE}')===false)) {
       $content["all"] = str_replace('{ARTICLE_TITLE}', $content['article_title'], $content["all"]);
    }
 
    // {ARTICLE_SUBTITLE}  -> ARTICLE_SUBTITLE replacement
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{ARTICLE_SUBTITLE}')===false)) {
       $content["all"] = str_replace('{ARTICLE_SUBTITLE}', $content['articles'][$content['article_id']]['article_subtitle'], $content["all"]);
    }
 
    // {ARTICLE_ID}  -> ARTICLE_ID replacement
    // since V1.4.2 r316 (09/06/24) this tag is replaced default by **{CURRENT_ARTICLEID}**
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{ARTICLE_ID}')===false)) {
       $content["all"] = str_replace('{ARTICLE_ID}', $content['article_id'], $content["all"]);
    }
 
    // {ARTICLE_ALIAS}  -> ARTICLE_ALIAS replacement
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{ARTICLE_ALIAS}')===false)) {
       $content["all"] = str_replace('{ARTICLE_ALIAS}', $content['articles'][$content['article_id']]['article_alias'], $content["all"]);
    }
}
 
// {TOPLEVEL replacement
// =======================================================
if( ! (strpos($content["all"],'{TOPLEVEL')===false)) {
 
    // {TOPLEVEL}  -> TOPLEVEL replacement
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{TOPLEVEL}')===false)) {
 
    $cur_toplevel_name = '';
    $nav_point_listing = get_breadcrumb($content["cat_id"], $content['struct']);
 
        if(isset($nav_point_listing) && count($nav_point_listing) > 1) {
           reset($nav_point_listing);
           next($nav_point_listing);
           $cur_toplevel_name = html_specialchars($content['struct'][ intval(key($nav_point_listing)) ]['acat_name']);
        }
    $content['all'] = str_replace('{TOPLEVEL}', $cur_toplevel_name, $content['all']);
    }
    // -----------------------------------------------------
 
 
    // {TOPLEVEL_ALIAS}  -> TOPLEVEL ALIAS replacement
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{TOPLEVEL_ALIAS}')===false)) {
 
    $cur_toplevel_alias = '';
    $nav_point_listing = get_breadcrumb($content["cat_id"], $content['struct']);
 
    if(isset($nav_point_listing) && count($nav_point_listing) > 1) {
       reset($nav_point_listing);
       next($nav_point_listing);
       $cur_toplevel_alias = html_specialchars($content['struct'][ intval(key($nav_point_listing)) ]['acat_alias']);
    }
    $content['all'] = str_replace('{TOPLEVEL_ALIAS}', $cur_toplevel_alias, $content['all']);
    }
// -------------------------------------------------------
}
 
 
 
// {PAGETITLE}  -> PAGETITLE replacement
// since V1.3.5 this tag is replaced default by {CATEGORY}
// =======================================================
if( ! (strpos($content["all"],'{PAGETITLE}')===false)) {
   $content["all"] = str_replace('{PAGETITLE}', $content["struct"][$content["cat_id"]]["acat_name"], $content["all"]);
}
 
 
// {CATEGORY_ replacement
// =======================================================
if( ! (strpos($content["all"],'{CATEGORY_')===false)) {
 
    // {CATEGORY_ID}  -> CATEGORY ID replacement
    // since V1.4.2 r316 (09/06/24) this tag is replaced default by **{CURRENT_CATEGORYID}**
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{CATEGORY_ID}')===false)) {
        $content["all"] = str_replace('{CATEGORY_ID}', $content["struct"][$content["cat_id"]]["acat_id"], $content["all"]);
    }
 
    // {CATEGORY_ALIAS}  -> CATEGORY ALIAS replacement
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{CATEGORY_ALIAS}')===false)) {
        $content["all"] = str_replace('{CATEGORY_ALIAS}', $content["struct"][$content["cat_id"]]["acat_alias"], $content["all"]);
    }
 
    // {CATEGORY_GO:ID}  -> CATEGORY link to cat-ID replacement
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{CATEGORY_GO:')===false)) {
 
        function category_link($id) {
        /**
         * @param:    array    $id[1]=cat-id
         * @return:    complete link to category with category title link text
         **/
            return '<a href="index.php?id='.$id[1].'" class="phpwcmsIntLink">'.
                    $GLOBALS['content']["struct"][$id[1]]["acat_name"].
                    '</a>';
        }
 
        if( ! (strpos($content["all"],'{CATEGORY_GO:')===false)) {
            $content["all"] = preg_replace_callback('/{CATEGORY_GO:(\d+)}/s', 'category_link', $content["all"]);
        }
    }
 
    // {CATEGORY_CLASS}  -> CATEGORY CLASS replacement
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{CATEGORY_CLASS}')===false)) {
        $content["all"] = str_replace('{CATEGORY_CLASS}', $content["struct"][$content["cat_id"]]["acat_class"], $content["all"]);
    }
 
}
 
 
 
// {PARENT_CATEGORY_ replacement
// =======================================================
if( ! (strpos($content["all"],'{PARENT_CATEGORY_')===false)) {
 
    // {PARENT_CATEGORY_ID}  -> PARENT_CATEGORY ID replacement
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{PARENT_CATEGORY_ID}')===false)) {
       $content["all"] = str_replace('{PARENT_CATEGORY_ID}',
       $content["struct"][$content["cat_id"]]["acat_struct"],
       $content["all"]);
    }
 
    // {PARENT_CATEGORY_ALIAS}  -> PARENT_CATEGORY ALIAS replacement
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{PARENT_CATEGORY_ALIAS}')===false)) {
       $content["all"] = str_replace('{PARENT_CATEGORY_ALIAS}',
       $content["struct"][$content["struct"][$content["cat_id"]]["acat_struct"]]["acat_alias"],
       $content["all"]);
    }
}
 
 
// [NOT_AT_HOME].....[/NOT_AT_HOME]_ replacement universal
// =======================================================
if( ! (strpos($content["all"],'[NOT_AT_HOME]')===false)) {
 
    // [NOT_AT_HOME].....[/NOT_AT_HOME]  ->  replacement
    // -----------------------------------------------------
    if( ($content["struct"][$content["cat_id"]]["acat_id"]!==0) ) {  // render all other categories than "home"
       $content["all"] = preg_replace('/\[NOT_AT_HOME\](.*?)\[\/NOT_AT_HOME\]/is','$1',$content["all"]);
    } else { // category "home" -> kill the tag
       $content["all"] = preg_replace('/\[NOT_AT_HOME\](.*?)\[\/NOT_AT_HOME\]/is','',$content["all"]);
    }
}
 
// -----------[ CLOSE ]----------------
?>

UPDATE: 26.01.09 (KH) –> added {TOPLEVEL_ALIAS}
UPDATE: 11.10.09 (KH) –> added {PARENT_CATEGORY_ID} {PARENT_CATEGORY_ALIAS}; kill all “$GLOBALS”, we don´t need it.
UPDATE: 11.10.09 (KH) –> added [NOT_AT_HOME]…..[/NOT_AT_HOME] (render all other categories than “home” (cat > 0))

quod vide example 3

V1.31
UPDATE: 19.03.10 (KH) –> added {CATEGORY_GO:ID} (with given ID: link to category with category title link text)
UPDATE: 23.06.10 (KH) –> added {ARTICLE_SUBTITLE}
UPDATE: 28.06.11 (KH) –> added {CATEGORY_CLASS} (custom class name of the active structure level)

quod vide example 5 and example 6


V1.41

Tag:
{ARTICLE_([TITLE][SUBTITLE][ID][ALIAS])} {CATEGORY_([ID][ALIAS][GO:ID][CLASS])} {PARENT_CATEGORY_([ID][ALIAS][TITLE])} [(/)LEVEL_START:S:E]

{ARTICLE_([TITLE][SUBTITLE][ID][ALIAS][GO:ID])} {CATEGORY_(...)} {PARENT_CATEGORY_(...)} [[/]LEVEL_START:S:E]

<?php
/******************************************************************
V1.4
14.10.2008 Tags assembled by (KH) flip-flop
26.01.2009 Update +  {TOPLEVEL_ALIAS}
11.10.2009 Update +  {PARENT_CATEGORYY_ID}, {PARENT_CATEGORYY_ALIAS}
           Update - kill  "$GLOBALS", we don´t need it
           Update + [NOT_AT_HOME].....[/NOT_AT_HOME] (render tags (cat >0))
13.10.2009 Update - [NOT_AT_HOME].....[/NOT_AT_HOME] (killed)
           Update +  {PARENT_CATEGORYY_TITLE}, [LEVEL_START:StartLevel:EndLevel].....[/LEVEL_START]
10.12.2009 Update =  Change var $row['... to  $content['...
 
V1.41
19.03.2010 Update +  {CATEGORY_GO:ID}
-> with given ID: link to category with category title link text
23.06.2010 Update +  {ARTICLE_SUBTITLE}
28.06.2011 Update +  {CATEGORY_CLASS}
 
TAG:
{ARTICLE_TITLE} {ARTICLE_SUBTITLE} {ARTICLE_ID} {ARTICLE_ALIAS}
{TOPLEVEL} {TOPLEVEL_ALIAS}
{PAGETITLE} = {CATEGORY} (since v1.3.5 )
{CATEGORY_ID} {CATEGORY_ALIAS} {CATEGORY_GO:ID}
{CATEGORY_CLASS}  (since v1.4.7 r403 (10/11/01) custom class name of the active structure level)
{PARENT_CATEGORYY_ID} {PARENT_CATEGORYY_ALIAS} {PARENT_CATEGORYY_TITLE}
[NOT_AT_HOME].....[/NOT_AT_HOME] (only rendered if category > 0)
 
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
if (!defined('PHPWCMS_ROOT')) {
   die("You Cannot Access This Script Directly, Have a Nice Day."); }
// ----------------------------------------------------------------
 
 
// {ARTICLE_ replacement
// =======================================================
if( ! (strpos($content["all"],'{ARTICLE_')===false)) {
 
    // {ARTICLE_TITLE}  -> ARTICLE_TITLE replacement
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{ARTICLE_TITLE}')===false)) {
       $content["all"] = str_replace('{ARTICLE_TITLE}', $content['article_title'], $content["all"]);
    }
 
    // {ARTICLE_SUBTITLE}  -> ARTICLE_SUBTITLE replacement
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{ARTICLE_SUBTITLE}')===false)) {
       $content["all"] = str_replace('{ARTICLE_SUBTITLE}', $content['articles'][$content['article_id']]['article_subtitle'], $content["all"]);
    }
 
    // {ARTICLE_ID}  -> ARTICLE_ID replacement
    // since V1.4.2 r316 (09/06/24) this tag is replaced default by **{CURRENT_ARTICLEID}**
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{ARTICLE_ID}')===false)) {
       $content["all"] = str_replace('{ARTICLE_ID}', $content['article_id'], $content["all"]);
    }
 
    // {ARTICLE_ALIAS}  -> ARTICLE_ALIAS replacement
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{ARTICLE_ALIAS}')===false)) {
       $content["all"] = str_replace('{ARTICLE_ALIAS}', $content['articles'][$content['article_id']]['article_alias'], $content["all"]);
    }
}
 
// {TOPLEVEL replacement
// =======================================================
if( ! (strpos($content["all"],'{TOPLEVEL')===false)) {
 
    // {TOPLEVEL}  -> TOPLEVEL replacement
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{TOPLEVEL}')===false)) {
 
    $cur_toplevel_name = '';
    $nav_point_listing = get_breadcrumb($content["cat_id"], $content['struct']);
 
        if(isset($nav_point_listing) && count($nav_point_listing) > 1) {
           reset($nav_point_listing);
           next($nav_point_listing);
           $cur_toplevel_name = html_specialchars($content['struct'][ intval(key($nav_point_listing)) ]['acat_name']);
        }
    $content['all'] = str_replace('{TOPLEVEL}', $cur_toplevel_name, $content['all']);
    }
    // -----------------------------------------------------
 
 
    // {TOPLEVEL_ALIAS}  -> TOPLEVEL ALIAS replacement
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{TOPLEVEL_ALIAS}')===false)) {
 
    $cur_toplevel_alias = '';
    $nav_point_listing = get_breadcrumb($content["cat_id"], $content['struct']);
 
    if(isset($nav_point_listing) && count($nav_point_listing) > 1) {
       reset($nav_point_listing);
       next($nav_point_listing);
       $cur_toplevel_alias = html_specialchars($content['struct'][ intval(key($nav_point_listing)) ]['acat_alias']);
    }
    $content['all'] = str_replace('{TOPLEVEL_ALIAS}', $cur_toplevel_alias, $content['all']);
    }
// -------------------------------------------------------
}
 
 
 
// {PAGETITLE}  -> PAGETITLE replacement
// since V1.3.5 this tag is replaced default by {CATEGORY}
// =======================================================
if( ! (strpos($content["all"],'{PAGETITLE}')===false)) {
   $content["all"] = str_replace('{PAGETITLE}', $content["struct"][$content["cat_id"]]["acat_name"], $content["all"]);
}
 
 
// {CATEGORY_ replacement
// =======================================================
if( ! (strpos($content["all"],'{CATEGORY_')===false)) {
 
    // {CATEGORY_ID}  -> CATEGORY ID replacement
    // since V1.4.2 r316 (09/06/24) this tag is replaced default by **{CURRENT_CATEGORYID}**
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{CATEGORY_ID}')===false)) {
        $content["all"] = str_replace('{CATEGORY_ID}', $content["struct"][$content["cat_id"]]["acat_id"], $content["all"]);
    }
 
    // {CATEGORY_ALIAS}  -> CATEGORY ALIAS replacement
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{CATEGORY_ALIAS}')===false)) {
        $content["all"] = str_replace('{CATEGORY_ALIAS}', $content["struct"][$content["cat_id"]]["acat_alias"], $content["all"]);
    }
 
    // {CATEGORY_GO:ID}  -> CATEGORY link to cat-ID replacement
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{CATEGORY_GO:')===false)) {
 
        function category_link($id) {
        /**
         * @param:    array    $id[1]=cat-id
         * @return:    complete link to category with category title link text
         **/
            return '<a href="index.php?id='.$id[1].'" class="phpwcmsIntLink">'.
                    $GLOBALS['content']["struct"][$id[1]]["acat_name"].
                    '</a>';
        }
 
        if( ! (strpos($content["all"],'{CATEGORY_GO:')===false)) {
            $content["all"] = preg_replace_callback('/{CATEGORY_GO:(\d+)}/s', 'category_link', $content["all"]);
        }
    }
 
    // {CATEGORY_CLASS}  -> CATEGORY CLASS replacement
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{CATEGORY_CLASS}')===false)) {
        $content["all"] = str_replace('{CATEGORY_CLASS}', $content["struct"][$content["cat_id"]]["acat_class"], $content["all"]);
    }
 
}
 
 
 
// {PARENT_CATEGORY_ replacement
// =======================================================
if( ! (strpos($content["all"],'{PARENT_CATEGORY_')===false)) {
 
    // {PARENT_CATEGORY_ID}  -> PARENT_CATEGORY ID replacement
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{PARENT_CATEGORY_ID}')===false)) {
       $content["all"] = str_replace('{PARENT_CATEGORY_ID}',
       $content["struct"][$content["cat_id"]]["acat_struct"],
       $content["all"]);
    }
 
    // {PARENT_CATEGORY_ALIAS}  -> PARENT_CATEGORY ALIAS replacement
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{PARENT_CATEGORY_ALIAS}')===false)) {
       $content["all"] = str_replace('{PARENT_CATEGORY_ALIAS}',
       $content["struct"][$content["struct"][$content["cat_id"]]["acat_struct"]]["acat_alias"],
       $content["all"]);
    }
 
    // {PARENT_CATEGORY_TITLE}  -> PARENT_CATEGORY TITLE replacement
    // -----------------------------------------------------
    if( ! (strpos($content["all"],'{PARENT_CATEGORY_TITLE}')===false)) {
       $content["all"] = str_replace('{PARENT_CATEGORY_TITLE}',
       $content["struct"][$content["struct"][$content["cat_id"]]["acat_struct"]]["acat_name"],
       $content["all"]);
    }
}
 
 
 
// [LEVEL_START:StartLevel:EndLevel].....[/LEVEL_START]_ replacement
// =======================================================
if( ! (strpos($content["all"],'[LEVEL_START:')===false)) {
 
    preg_match_all('/\[LEVEL_START:(.*?)\](.*?)\[\/LEVEL_START\]/is',$content["all"],$my_param_in);
 
/*    --------------------------------------------------------
    // --------------------------- example tags
    [LEVEL_START:2]<a href="index.php?{PARENT_CATEGORY_ALIAS}">{PARENT_CATEGORY_TITLE}</a>[/LEVEL_START]<br>
    [LEVEL_START:1:3]<a href="index.php?{PARENT_CATEGORY_ALIAS}">{PARENT_CATEGORY_TITLE}</a>[/LEVEL_START]<br>
 
    // --------------------------- every tag string separated
    $my_param_in[0][0] => [LEVEL_START:2]<a href="index.php?category04">Category04</a>[/LEVEL_START]
    $my_param_in[0][1] => [LEVEL_START:1:3]<a href="index.php?category04">Category04</a>[/LEVEL_START]
 
    // --------------------------- start/end-level
    $my_param_in[1][0] => 2:
    $my_param_in[1][1] => 1:3
    // --------------------------- All between start/end-ltag
    $my_param_in[2][0] => <a href="index.php?category04">Category04</a>
    $my_param_in[2][1] => <a href="index.php?category04">Category04</a>
 
    // --------------------------- start/end-level deparated
    $my_param[0][0] => 2
    $my_param[0][1] =>
 
    $my_param[1][0] => 1
    $my_param[1][1] => 3
    -------------------------------------------------------- */
 
 
    foreach ($my_param_in[1] as $key=>$value) {  // figure out start/end-level
 
        ( !empty($my_param_in[1][$key]) ) ? $my_param[$key] = explode(':', $value) : $my_param[$key][0] = '0';
 
        $my_param[$key][0] = empty($my_param[$key][0]) ? 0    : intval($my_param[$key][0]);  // Update level, if there is no entry
        $my_param[$key][1] = empty($my_param[$key][1]) ? 100  : intval($my_param[$key][1]);  // Update level, if there is no entry
 
        if( isset($LEVEL_ID[$my_param[$key]['0']]) AND (!isset($LEVEL_ID[$my_param[$key]['1']+1]) ) ) {
 
            $content["all"] = str_replace($my_param_in['0'][$key], $my_param_in['2'][$key],$content["all"]);
        } else {
 
            $content["all"] = str_replace($my_param_in['0'][$key], '',$content["all"]); // kill the tag
        }
    } // end foreach
 
}
 
// -----------[ CLOSE ]----------------
?>

UPDATE: 26.01.09 (KH) –> added {TOPLEVEL_ALIAS}
UPDATE: 11.10.09 (KH) –> added {PARENT_CATEGORY_ID} {PARENT_CATEGORY_ALIAS}; kill all “$GLOBALS”, we don´t need it.
UPDATE: 11.10.09 (KH) –> deleted [NOT_AT_HOME]…..[/NOT_AT_HOME] (render all other categories than “home” (cat > 0))
UPDATE: 13.10.09 (KH) –> added {PARENT_CATEGORY_TITLE} [LEVEL_START:S:E]…..[/LEVEL_START] (between the tags: render all categories than (Level < StartLevel AND Level > EndLevel))

quod vide example 4

V1.41
UPDATE: 19.03.10 (KH) –> added {CATEGORY_GO:ID} (with given ID: link to category with category title link text)
UPDATE: 28.06.11 (KH) –> added {CATEGORY_CLASS} (custom class name of the active structure level)

quod vide example 5 and example 6



Example 1: All variable spend

Install the rt above and put this test snippet into your template

In e.g. {TAG:} the colon “:” isn´t a right construction. I used it only to show the tag for a better understanding!
The real notation is {TAG} :!:

test snippet All variable spend

<!-- =================== //-->
 
<div style="font-size:10px;"><br>
---------------------------<br>
<b>rt_cat_article_id</b><br>                          <!-- name of the rt                              //-->
{TOPLEVEL:} {TOPLEVEL}<br>                            <!-- The toplevel name                           //-->
{TOPLEVEL_ALIAS:} {TOPLEVEL_ALIAS}<br>                <!-- The toplevel alias                          //-->
{PAGETITLE:} {PAGETITLE}<br>                          <!-- The actual pagetitle, same like {CATEGORIE} //-->
{CATEGORY_ALIAS:} {CATEGORY_ALIAS}<br>                <!-- The actual category alias                   //-->
{CATEGORY_ID:} {CATEGORY_ID}<br>                      <!-- The actual category ID {CURRENT_CATEGORYID} //-->
{CATEGORY_CLASS:} {CATEGORY_CLASS}<br>                <!-- The actual category CSS class               //-->
{ARTICLE_TITLE:} {ARTICLE_TITLE}<br>                  <!-- The actual article title                    //-->
{ARTICLE_SUBTITLE:} {ARTICLE_SUBTITLE}<br>            <!-- The actual article subtitle                 //-->
{ARTICLE_ALIAS:} {ARTICLE_ALIAS}<br>                  <!-- The actual article alias                    //-->
{ARTICLE_ID:} {ARTICLE_ID}<br>                        <!-- The actual article ID {CURRENT_ARTICLEID}   //-->
{PARENT_CATEGORY_ID:} {PARENT_CATEGORY_ID}<br>        <!-- The parent category ID {PARENT_CATEGORY_ID}       //-->
{PARENT_CATEGORY_ALIAS:} {PARENT_CATEGORY_ALIAS}<br>  <!-- The parent category alias {PARENT_CATEGORY_ALIAS} //-->
{PARENT_CATEGORY_TITLE:} {PARENT_CATEGORY_TITLE}<br>  <!-- The parent category title {PARENT_CATEGORY_TITLE} //-->
 
<b>Core since V1.4.2 r316</b><br>
---------------------------<br>
{CURRENT_CATEGORYID:} {CURRENT_CATEGORYID}<br>  <!-- The actual category ID  //-->
{CURRENT_ARTICLEID:} {CURRENT_ARTICLEID}<br>    <!-- The actual article ID   //-->
 
<!-- =================== //-->
 
<!-- Little test: //-->
<b>Output if a certain category is the actual one</b><br>
---------------------------<br>
 
[PHP] // Little test: Output if a certain category is the actual one
if ({CURRENT_CATEGORYID} == 7) {
// if ($GLOBALS['aktion']['0'] == 7) {  // The same for older versions
  echo 'That is the category No. 7={CATEGORY} <br>';
}
else
{
  echo 'That is the category {CATEGORY}=ID:{CURRENT_CATEGORYID} <br>';
}
[/PHP]
 
<!-- =================== //-->
</div> <!-- end font-size //-->


Example 2: Queries a category

Assumption: IF category-ID = 3 THEN show the article(ID=16) ELSE show the article(ID=17).

category query

[PHP]
if ($GLOBALS['content']["struct"][$GLOBALS['content']["cat_id"]]["acat_id"] == 3) {
 
// if ($GLOBALS['aktion']['0'] == 3) {  // use alternatively
 
 
  echo '{SHOW_CONTENT:CPA,16}';
}
else
{
  echo '{SHOW_CONTENT:CPA,17}';
}
[/PHP]


Using the new tag {CURRENT_CATEGORYID}

Update 24.06.2009: Revision: r316

category query new

[PHP]
if ({CURRENT_CATEGORYID} == 3) {
 
// if ($GLOBALS['aktion']['0'] == 3) {  // works alternatively
 
 
  echo '{SHOW_CONTENT:CPA,16}';
}
else
{
  echo '{SHOW_CONTENT:CPA,17}';
}
[/PHP]


Example 3: Using the tag [NOT_AT_HOME]

  • Update: V1.3 (11.10.2009 KH)
  • Universal tag that exclude the category “home”.

In this example with a link to the parent category.

[NOT_AT_HOME]<strong><a href="index.php?{PARENT_CATEGORY_ALIAS}>Elternebene</a></strong>[/NOT_AT_HOME]


All between [NOT_AT_HOME] and [/NOT_AT_HOME] is always rendered except in the category “home”. In “home” the complete tag with contents is faded out.


Example 4: Using the tag [LEVEL_START:S:E]

  • Update: V1.4 (13.10.2009 KH)
  • Universal tag excludes the categories level < StarLevel AND level > EndLevel.

In this example with a link to the parent category.

[LEVEL_START:1:3]<a href="index.php?{PARENT_CATEGORY_ALIAS}">{PARENT_CATEGORY_TITLE}</a>[/LEVEL_START]<br>


All between [LEVEL_START:1:3] and [/LEVEL_START] is always rendered except the categories are not in level 1, 2 or 3. In all other level the complete tag with contents is faded out.


Example 5: Using the tag {CATEGORY_GO:ID}

  • Update: V1.41 (19.03.2010 KH)
  • A link to the category with the ID is generated by this tag. Link text is the category title.

Hier am Beispiel mit einem Link zur Kategorie mit der Seitenebene Überschrift “Category03”, dem Alias “category03” und der ID “14”.

An example with a link to the category with the category title “Category03,” the alias “category03” and the ID “14”.

{CATEGORY_GO:14}

<a href="index.php?category03" class="phpwcmsIntLink">Category03</a>


Example 6: {CATEGORY_CLASS}

  • Update: V1.47 (28.06.2011 KH)
  • TAG spending the registered class name of “site structure → CSS class” of the current category.

In this example, the current category class is used in a template.

{CATEGORY_CLASS}

<div id="wrapper" class="{CATEGORY_CLASS}"> . . . </div>



Have a look: System variables

english/phpwcms_replacer_rts/frontend_render/standard_tags_assembled.txt · Last modified: 2012/03/14 21:26 by Knut Heermann (flip-flop)
www.planmatrix.de www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0