Sure you can also render the content elements in a list template using the same way. (list and reader are basically the same. The reader array length is only 1. That's the main difference)
PHP-Code:
<?php
$objCC = $this->getCustomCatalog();
foreach($this->entries as $entry)
{
$objContentEntries = $objCC->fetchPublishedContentElementsById( $entry->field('id')->value() );
echo $objCC->renderContentElements( $objContentEntries );
}
?>
Also correct in the reader module template is a direkt call to the field() method, retrieving the current entry record
PHP-Code:
$objContentEntries = $objCC->fetchPublishedContentElementsById( $this->field('id')->value() );

Einen Kommentar schreiben: