Nun graust es mich davor, unzählige Custom-Templates für die benötigten Contentparts zu erstellen.
![Shocked :shock:](./images/smilies/icon_eek.gif)
Hat jemand dafür eine Idee für einen eleganteren Ansatz?
Code: Select all
...
// Space before --- geaendert zu 960 grid artikle oeffnen
if($crow["acontent_before"]) {
// if(!empty($template_default["article"]["div_spacer"])) {
// $CNT_TMP .= '<div style="margin-top:'.$crow["acontent_before"].'px;" class="'.$template_default['classes']['spaceholder-cp-before'].'"></div>';
$CNT_TMP .= '<article class="grid_'.$crow["acontent_before"];
if($crow["acontent_after"]) {
$CNT_TMP .= ' suffix_'.$crow["acontent_after"].'>';
}
$CNT_TMP .= '">';
// } else {
// $CNT_TMP .= '<br class="'.$template_default['classes']['spaceholder-cp-before'].'" />'.spacer(1,$crow["acontent_before"]);
// }
}
// set frontend edit link
if($content['article_frontend_edit']) {
$CNT_TMP .= getFrontendEditLink('CP', $crow['acontent_aid'], $crow['acontent_id']);
}
// include content part code section
if($crow["acontent_type"] != 30) {
@include(PHPWCMS_ROOT."/include/inc_front/content/cnt".$crow["acontent_type"].".article.inc.php");
} elseif($crow["acontent_type"] == 30 && is_file($phpwcms['modules'][$crow["acontent_module"]]['path'].'inc/cnt.article.php')) {
if($content['article_frontend_edit']) {
$CNT_TMP .= getFrontendEditLink('module', $phpwcms['modules'][$crow["acontent_module"]]['name'], $crow['acontent_aid']);
}
// now try to include module content part code
include($phpwcms['modules'][$crow["acontent_module"]]['path'].'inc/cnt.article.php');
}
// check if top link should be shown
$CNT_TMP .= getContentPartTopLink($crow["acontent_top"]);
// Space after
// if($crow["acontent_after"]) {
// if(!empty($template_default["article"]["div_spacer"])) {
// $CNT_TMP .= '<div style="margin-bottom:'.$crow["acontent_after"].'px;" class="'.$template_default['classes']['spaceholder-cp-after'].'"></div>';
// } else {
// $CNT_TMP .= '<br class="'.$template_default['classes']['spaceholder-cp-after'].'" />'.spacer(1,$crow["acontent_after"]);
// }
// }
// Ergaenzung 960 grid artikle schließen
if($crow["acontent_before"]) {
$CNT_TMP .= '</article>';
}
// Maybe content part ID should b used inside templates or for something different