Mit RSCE (https://extensions.contao.org/?q=roc...ustom-elements) kann man das lösen. Nicht schön, aber funktioniert.
rsce_articlelist_config.php
PHP-Code:
<?php
return array(
'label' => array('Artikelauflistung', 'Listet alle Artikelinhalte auf einer Seite aus.'),
'types' => array('content'),
'contentCategory' => 'misc',
'standardFields' => array('cssID'),
'fields' => array(
'headline' => array(
'inputType' => 'standardField',
),
'pageSettings' => array(
'label' => array('Seiten-Einstellungen'),
'inputType' => 'group',
),
'page' => array(
'label' => array('Seite','Wählen Sie die Referenzseite aus.'),
'inputType' => 'picker',
'eval' => ['context' => 'dc.tl_page','mandatory' => true],
),
)
);
?>
rsce_articlelist.html5
PHP-Code:
<?php
if (TL_MODE === 'BE') {
echo '<span style="color: #999">### Artikelliste ###</span>';
return;
}
?>
<div class="ce_articlelist <?php echo $this->class ?> block"<?php echo $this->cssID ?>>
<?php if($this->headline):?><<?= $this->hl ?>><?php echo $this->headline ?></<?= $this->hl ?>><?php endif; ?>
<?php
if( $objArticles = \ArticleModel::findPublishedByPidAndColumn($this->page,'main')) :
while($objArticles->next()){
echo \Controller::getArticle($objArticles->id, false, true, 'main' );
}
endif; ?>
</div>
Lesezeichen