This is an old revision of the document!


[PHP]

 // aktuelle Artikel-ID holen
    $article = {ARTICLEID};
    // 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 = ' . $article . ' ';
    //$sql .= "AND acontent_comment LIKE '%{SHOW_CP}%' ";
    $sql .= "ORDER BY acontent_sorting";
    $result = _dbQuery($sql);

if(isset($result[0]['acontent_id'])) { Any result available? CP-ID String fuer SHOW_CONTENT bereitstellen

       // 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]

deutsch/phpwcms-system/artikel/vorlagen/artikel-liste/ausgabe-inkl-cp.1331394648.txt.gz · Last modified: 2018/06/03 18:06 (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