Differences

This shows you the differences between two versions of the page.

english:phpwcms_replacer_rts:frontend_render:show_article_cp [2010/01/17 15:39]
Knut Heermann (flip-flop)
english:phpwcms_replacer_rts:frontend_render:show_article_cp [2018/06/03 18:09] (current)
Line 1: Line 1:
{{indexmenu_n>500}} {{indexmenu_n>500}}
 +
===== SHOW_ARTICLE_CP ===== ===== SHOW_ARTICLE_CP =====
Line 5: Line 6:
Tag: **{SHOW_ARTICLE_CP} <-> {SHOW_CP}** Tag: **{SHOW_ARTICLE_CP} <-> {SHOW_CP}**
-Forum: [[http://forum.phpwcms.org/viewtopic.php?f=8&t=17082|{SHOW_ARTICLE_CP} <-> {SHOW_CP}]] 
DisplayS CPs OF articles in listing-mode where you are placing {SHOW_ARTICLE_CP} in your active structure. DisplayS CPs OF articles in listing-mode where you are placing {SHOW_ARTICLE_CP} in your active structure.
Line 33: Line 33:
Where **[X]** is the sort criterion e.g. **A{SHOW_CP} .... B{SHOW_CP} .... C{SHOW_CP} ....** Where **[X]** is the sort criterion e.g. **A{SHOW_CP} .... B{SHOW_CP} .... C{SHOW_CP} ....**
-Place this tag at first in comment field for correct sorting (If you need)!!!+:!: Place this tag at first in comment field for correct sorting (If you need) :!:
And -> CP status: [x] visible (Or change "acontent_visible" in script). And -> CP status: [x] visible (Or change "acontent_visible" in script).
 +
 +\\
---- ----
---- ----
 +
 +Docu: -- \\
 +Forum: [[http://forum.phpwcms.org/viewtopic.php?f=8&t=17082|{SHOW_ARTICLE_CP} <-> {SHOW_CP}]]
 +
 +
 +**Autor:** K.Heermann (flip-flop) http://planmatrix.de / O.Georgi http://phpwcms.de  \\
 +**CMS Version:** >= 1.3 \\
 +**Version:** V1.0 \\
 + Update: V1.1: Changing the sorting criterion //(17.01.2010)//
 +
 + 
 +
 +Tag: **{SHOW_ARTICLE_CP} <-> {SHOW_CP}**
 +
 +Filename: **rt_show_article_cp.php** \\
 +Filder:  ** template/inc_script/frontend_render/ **
 +
 +**Condition:**  -> [[http://www.phpwcms-docu.de/conf_inc_php_en.phtml|/config/phpwcms/conf.inc.php]] \\
 +  * $phpwcms['allow_ext_render']  = 1;
 +
 +
 +----
 +----
 +
\\ \\
 +===== Code V1.0: =====
Location: **/template/inc_script/frontend_render/rt_show_article_cp.php** Location: **/template/inc_script/frontend_render/rt_show_article_cp.php**
 +
<code php|h {SHOW_ARTICLE_CP} - {SHOW_CP} |h> <code php|h {SHOW_ARTICLE_CP} - {SHOW_CP} |h>
<?php <?php
Line 131: Line 159:
</code> </code>
-\\+~~UP~~
-===== Update v1.1: Changing the sorting criterion =====+====== Update v1.1: Changing the sorting criterion ======
You can turn off the sort order via the comment, and turn on sorting as defined in the structure by changing in  \\ You can turn off the sort order via the comment, and turn on sorting as defined in the structure by changing in  \\
Line 140: Line 168:
from from
<code php> <code php>
-  // CUSTOM INPUT ============================================== +// CUSTOM INPUT ============================================== 
-  // sort order: [true|false] [by comment field | by structure]+// sort order: [true|false] [by comment field | by structure]
  $sort_by_comment = true;   $sort_by_comment = true;
-  // ===========================================================+// ===========================================================
</code> </code>
to to
<code php> <code php>
-  // CUSTOM INPUT ============================================== +// CUSTOM INPUT ============================================== 
-  // sort order: [true|false] [by comment field | by structure]+// sort order: [true|false] [by comment field | by structure]
  $sort_by_comment = false;   $sort_by_comment = false;
-  // ===========================================================+// ===========================================================
</code> </code>
\\ \\
 +
==== Code V1.1 ==== ==== Code V1.1 ====
 +
 +Location: **/template/inc_script/frontend_render/rt_show_article_cp.php**
<code php|h rt_show_article_cp.php |h> <code php|h rt_show_article_cp.php |h>
Line 204: Line 235:
function my_article_count_cp() { function my_article_count_cp() {
   
-  // CUSTOM INPUT ============================================== +  
-  // sort order: [true|false] [by comment field | by structure]+// CUSTOM INPUT ============================================== 
 +// sort order: [true|false] [by comment field | by structure]
  $sort_by_comment = true;   $sort_by_comment = true;
-  // ===========================================================+// =========================================================== 
 +
   
  // Artikel der aktuellen Seitenebene holen   // Artikel der aktuellen Seitenebene holen
Line 259: Line 292:
                         
            }             }
 +          
         }          }
-          
-          
-  
- +
         // Ausgabe der betroffenen CPs mit SHOW_CONTENT          // Ausgabe der betroffenen CPs mit SHOW_CONTENT
         // Make the encountered CPs available with SHOW_CONTENT          // Make the encountered CPs available with SHOW_CONTENT
Line 275: Line 306:
?> ?>
</code> </code>
 +
 +~~UP~~
 +\\
 +
 +===== For programmers: =====
 + 
 +
 +<note tip>
 + 
 +**The basic routine to determine the IDs of all items in a category:**
 +<code php>
 +   $article = array();
 +  
 +   foreach($GLOBALS['content']['articles'] as $value) {
 +      $article[] = $value['article_id'];
 +   }
 +
 +   if(count($article)) {
 +      ........
 +
 +</code>
 +\\
 +
 +**The ID of the current article:**
 +<code php>
 +$GLOBALS['aktion'][1];
 +</code>
 +\\
 +If the IDs of the CPs of an article are required, they must be read from the DB. CP-IDs are not held in the parent hierarchy, in this case the articles. \\
 +The routine for this is shown in the RT.
 +
 +Interesting for this is the inserted tag {SHOW_CONTENT:....} and/or the function
 +<code php>function showSelectedContent($param='') { ...</code>
 +in %%''/include/inc_front/ext.func.inc.php''%%.
english/phpwcms_replacer_rts/frontend_render/show_article_cp.1263739183.txt.gz · Last modified: 2018/06/03 18:08 (external edit)
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