NAVIGATION
This shows you the differences between two versions of the page.
deutsch:phpwcms-system:artikel:vorlagen:artikel-liste:ausgabe-inkl-cp [2012/03/10 16:50] Robert created |
deutsch:phpwcms-system:artikel:vorlagen:artikel-liste:ausgabe-inkl-cp [2018/06/03 18:08] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | [PHP] | + | ====== Artikel inklusive CP ====== |
- | // aktuelle Artikel-ID holen | + | |
- | $article = {ARTICLEID}; | + | |
+ | Derzeit gibt es keine Möglichkeit im der Artikellisten-Ansicht auch die CPs auszugeben. Diese Erweiterung für das Listing-Template ändert das. | ||
+ | \\ | ||
+ | ---- | ||
+ | |||
+ | **Autor:** Robert // Auf Grundlage der Arbeit von K.Heermann (flip-flop) // \\ | ||
+ | **Vorlage Artikellisting Template:** -- | ||
+ | |||
+ | ---- | ||
+ | |||
+ | \\ | ||
+ | Neues phpwcms (>=18112014) | ||
+ | <code php> | ||
+ | {SHOW_CONTENT:CPA, {ARTICLEID} } | ||
+ | </code> | ||
+ | |||
+ | Altes phpwcms (<18112014) | ||
+ | <code php> | ||
+ | [PHP] | ||
// Artikel in der DB suchen und CP-ID bereitstellen | // Artikel in der DB suchen und CP-ID bereitstellen | ||
// Search for the article and make the CP-ID available | // Search for the article and make the CP-ID available | ||
Line 8: | Line 24: | ||
$sql .= "FROM ".DB_PREPEND."phpwcms_articlecontent "; | $sql .= "FROM ".DB_PREPEND."phpwcms_articlecontent "; | ||
$sql .= "WHERE acontent_visible=1 AND acontent_trash=0 "; | $sql .= "WHERE acontent_visible=1 AND acontent_trash=0 "; | ||
- | $sql .= 'AND acontent_aid = ' . $article . ' '; | + | $sql .= 'AND acontent_aid = ' . {ARTICLEID} . ' '; |
- | //$sql .= "AND acontent_comment LIKE '%{SHOW_CP}%' "; | + | |
$sql .= "ORDER BY acontent_sorting"; | $sql .= "ORDER BY acontent_sorting"; | ||
Line 16: | Line 31: | ||
if(isset($result[0]['acontent_id'])) { // Any result available? | if(isset($result[0]['acontent_id'])) { // Any result available? | ||
- | // CP-ID String fuer SHOW_CONTENT bereitstellen | ||
// Create CP-IDs string for SHOW_CONTENT | // Create CP-IDs string for SHOW_CONTENT | ||
$cp_my_id_str = ''; | $cp_my_id_str = ''; | ||
Line 24: | Line 38: | ||
} | } | ||
- | //Make the encountered CPs available | + | // Make the encountered CPs available |
echo showSelectedContent('CP'.$cp_my_id_str); | echo showSelectedContent('CP'.$cp_my_id_str); | ||
} | } | ||
[/PHP] | [/PHP] | ||
+ | </code> | ||
+ | |||
+ | \\ | ||
+ | |||
+ | Siehe auch: | ||
+ | |||
+ | [[deutsch/ersetzer_rts/frontend_render/show_article_cp]] | ||
+ | |||
+ | [[http://www.phpwcms-docu.de/artikel_tags.phtml|RT: {SHOW_CONTENT:MODE,id,id,id}]] | ||
+ | |||
+ | <file> | ||
+ | 2. {SHOW_CONTENT:CPA, art-id, art-id, art-id} | ||
+ | Aufsteigende Ausgabe der CPs, jedoch sind die IDs die Artikel-IDs. | ||
+ | |||
+ | 3. {SHOW_CONTENT:CPAD, art-id, art-id, art-id} | ||
+ | Absteigende Auagabe der CPs. IDs sind Artikel-IDs. | ||
+ | (Die Seitenausgabe verlangsamt sich etwas). | ||
+ | </file> | ||
+ | |||
+ | \\ | ||