Standard Tags zusammengefasst

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


Autor: 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: alle Versionen: (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 (23.06.2010 KH)


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

Update: alle Versionen (28.06.2011 KH)
+ {CATEGORY_CLASS} → custom class names for structure levels

Tag V1.4:
{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} seit V1.4.2 r316 (24.06.09) ersetzt durch den eingebauten Tag {CURRENT_ARTICLEID}
  • {ARTICLE_ALIAS}
  • {TOPLEVEL}
  • {TOPLEVEL_ALIAS}
  • {PAGETITLE} : seit V1.3.5 ersetzt durch den eingebauten Tag {CATEGORY}
  • {CATEGORY_ID} seit V1.4.2 r316 (24.06.09) ersetzt durch den eingebauten Tag {CURRENT_CATEGORYID}
  • {CATEGORY_ALIAS}
  • {CATEGORY_GO:ID}
  • {CATEGORY_CLASS} seit V1.4.7 r403 (02.11.2010) Gibt Kategorieklassenname der aktiven Struktur aus
  • {PARENT_CATEGORY_ID}
  • {PARENT_CATEGORY_ALIAS}
  • {PARENT_CATEGORY_TITLE}
  • [NOT_AT_HOME]. . . . .[/NOT_AT_HOME] (zwischen den Tags: Es werden alle Kategorien gerendert außer “home” (caterory > 0))
  • [LEVEL_START:StartLevel:EndLevel]. . . . .[/LEVEL_START] (zwischen den Tags: Es werden alle Kategorien gerendert außer (Level < StartLevel UND Level > EndLevel))


Dateiname: rt_cat_article_id.php
Verzeichnis: /template/inc_script/frontend_render/

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




Snippets

Update: Alle Versionen 23.06.2010 KH.

Artikel Untertitel:

$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_CATEGORYID} (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} (Gibt Kategorieklassenname der aktiven Struktur aus)

Siehe auch Beispiel 5 und Beispiel 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 names 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} (Gibt Kategorieklassenname der aktiven Struktur aus)

Siehe auch Beispiel 5 und Beispiel 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 names 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))

Siehe auch Beispiel 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} (Gibt Kategorieklassenname der aktiven Struktur aus)

Siehe auch Beispiel 5 und Beispiel 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}
-> custom class name of the active structure level
 
 
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))

Siehe auch Beispiel 4

V1.41
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} (Gibt Kategorieklassenname der aktiven Struktur aus)

Siehe auch Beispiel 5 und Beispiel 6



Beispiel 1: Alle Variablen ausgeben

Installiere den obigen RT und setze diesen Testcode in das Template

In z.B. {TAG:} ist der Doppelpunkt “:” eine falsche Konstruktion. Ich verwende diese Schreibweise hier nur für ein besseres Verständnis!
Die richtige Schreibweise ist {TAG} :!:

Testcode Alle Variablen ausgeben

<!-- =================== //-->
 
<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>  <!-- Die aktuelle Kategorie-ID  //-->
{CURRENT_ARTICLEID:} {CURRENT_ARTICLEID}<br>    <!-- Die aktuelle Artikel-ID    //-->
 
<!-- =================== //-->
 
<!-- Kleiner Test: //-->
<b>Ausgabe wenn eine bestimmte Kategorie (ID=7) die aktuelle ist</b><br>
---------------------------<br>
 
[PHP] // Kleiner Test: Ausgabe wenn die aktuelle Kategorie die ID=7 ist
if ({CURRENT_CATEGORYID} == 7) {
// if ($GLOBALS['aktion']['0'] == 7) {  // Das Gleiche in der alten Version
  echo 'Kategorie mit der Nr. 7={CATEGORY} <br>';
}
else
{
  echo 'Das ist die Kategorie {CATEGORY}=ID:{CURRENT_CATEGORYID} <br>';
}
[/PHP]
 
<!-- =================== //-->
</div> <!-- end font-size //-->



Beispiel 2: Abfrage einer Kategorie

Annahme: Die abzufragende Kategorie hat die ID = 3, es sollen daraufhin verschiedene Artikel ausgegeben werden.

Kategorieabfrage

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


Der neue Tag {CURRENT_CATEGORYID}

Update 25.06.2009: Revision: r316

Kategorieabfrage neu

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


Beispiel 3: [NOT_AT_HOME]

  • Update: V1.3 (11.10.2009 KH)
  • Universeller TAG, der die Kategorie “Home” ausschließt.

Hier am Beispiel mit einem Link zur übergeordneten Kategorie (Eltern-Kategorie).

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


Alles zwischen [NOT_AT_HOME] und [/NOT_AT_HOME] wird immer gerendert außer in der Kategorie “Home”. In “Home” wird der komplette Tag mit Inhalt ausgeblendet.


Beispiel 4: [LEVEL_START:S:E]

  • Update: V1.4 (13.10.2009 KH)
  • Universeller TAG, der die Kategorien in Level < StarLevel AND Level > EndLevel ausschließt.

Hier am Beispiel mit einem Link zur übergeordneten Kategorie (Eltern-Kategorie).

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


Alles zwischen [LEVEL_START:1:3] und [/LEVEL_START] wird immer gerendert außer wenn die Kategorie nicht in Level 1, 2 oder 3 liegen. In allen anderen Leveln wird der TAG und Inhalt komplette ausgeblendet.


Beispiel 5: {CATEGORY_GO:ID}

  • Update: V1.41 (19.03.2010 KH)
  • TAG, der einen Link zur Kategorien mit der angegebenen ID generiert. Linktext ist die Seitenebene Überschrift.

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

{CATEGORY_GO:14}

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


Beispiel 6: {CATEGORY_CLASS}

  • Update: V1.47 (28.06.2011 KH)
  • TAG der den eingetragenen Klassennamen aus “Seitenstruktur → CSS Klasse” der aktuellen Kategorie ausgibt.

Ein Beispiel wie die aktuelle Kategorieklasse in einem Template verwendet werden kann.

{CATEGORY_CLASS}

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



Siehe auch: Systemvariablen

deutsch/ersetzer_rts/frontend_render/standard_tags_assembled.txt · Last modified: 2012/03/14 21:23 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