{{indexmenu_n>10}} ====== Article list with CP included ====== Actually there is no way to show CPs in article listing too. This little enhancement will change that \\ ---- **Author:** Robert // Based on a work of K.Heermann (flip-flop) // \\ **Template: Article listing Template:** -- ---- \\ New phpwcms (>=18112014) {SHOW_CONTENT:CPA, {ARTICLEID} } OLD phpwcms (<18112014) [PHP] // Artikel in der DB suchen und CP-ID bereitstellen // Search for the article and make the CP-ID available $sql = "SELECT acontent_id, acontent_aid "; $sql .= "FROM ".DB_PREPEND."phpwcms_articlecontent "; $sql .= "WHERE acontent_visible=1 AND acontent_trash=0 "; $sql .= 'AND acontent_aid = ' . {ARTICLEID} . ' '; $sql .= "ORDER BY acontent_sorting"; $result = _dbQuery($sql); if(isset($result[0]['acontent_id'])) { // Any result available? // Create CP-IDs string for SHOW_CONTENT $cp_my_id_str = ''; foreach($result as $value) { $cp_my_id_str .= ','.$value['acontent_id']; } // Make the encountered CPs available echo showSelectedContent('CP'.$cp_my_id_str); } [/PHP] \\ Check this too: [[deutsch/ersetzer_rts/frontend_render/show_article_cp]] [[http://www.phpwcms-docu.de/artikel_tags.phtml|RT: {SHOW_CONTENT:MODE,id,id,id}]] 2. {SHOW_CONTENT:CPA, art-id, art-id, art-id} Ascending output of CPs, this time the IDs are Article-IDs. 3. {SHOW_CONTENT:CPAD, art-id, art-id, art-id} Descending output of CPs. IDs are Article-IDs. (slowing the output a little bit). \\