Ich beschäftige mich erst seit heute mit Isotope, und konnte nichts im Forum finden was meine Anfängerfrage beantwortet. Vielleicht konnte ich auch einige Beiträge hier im Forum nicht interpretieren. Jetzt aber zu meinem Problem.
Ausgeben möchte ich ein Attribut "audio" vom Typ "Video/Audio im Template "mod_iso_productreader.html5". Der Code ist folgender, wie im Handbuch beschrieben.
PHP-Code:
<div class="<?php echo $this->class; ?> block"<?php echo $this->cssID; ?><?php if ($this->style): ?> style="<?php echo $this->style; ?>"<?php endif; ?>>
<?php if ($this->headline): ?>
<<?php echo $this->hl; ?>><?php echo $this->headline; ?></<?php echo $this->hl; ?>>
<?php endif; ?>
<div<?php echo $this->product_id; ?> class="<?php echo $this->product_class; ?>">
<?php echo $this->product; ?>
</div>
<!-- indexer::stop -->
<p class="back"><a href="<?php echo $this->referer; ?>" title="<?php echo $this->back; ?>"><?php echo $this->back; ?></a></p>
<!-- indexer::continue -->
<?php echo $this->generateAttribute('audio'); ?>
</div>
Also der ganz normale Standardcode + <?php echo $this->generateAttribute('interner_name'); ?>. Als Ergebnis bekomme ich aber dann auf der Seite
Code:
Fatal error: Uncaught exception InvalidArgumentException with message generateAttribute is not set or not a callable thrown in system/modules/core/library/Contao/Template.php on line 110
#0 templates/mod_iso_productreader.html5(15): Contao\Template->__call('generateAttribu...', Array)
#1 templates/mod_iso_productreader.html5(15): Contao\FrontendTemplate->generateAttribute('audio')
#2 system/modules/core/library/Contao/BaseTemplate.php(88): include('/kunden/213004_...')
#3 system/modules/core/library/Contao/Template.php(238): Contao\BaseTemplate->parse()
#4 system/modules/core/classes/FrontendTemplate.php(38): Contao\Template->parse()
#5 system/modules/core/modules/Module.php(178): Contao\FrontendTemplate->parse()
#6 composer/vendor/isotope/isotope-core/system/modules/isotope/library/Isotope/Module/Module.php(86): Contao\Module->generate()
#7 composer/vendor/isotope/isotope-core/system/modules/isotope/library/Isotope/Module/ProductReader.php(74): Isotope\Module\Module->generate()
#8 system/modules/core/elements/ContentModule.php(56): Isotope\Module\ProductReader->generate()
#9 system/modules/core/library/Contao/Controller.php(469): Contao\ContentModule->generate()
#10 system/modules/core/modules/ModuleArticle.php(187): Contao\Controller::getContentElement(Object(Contao\ContentModel), 'main')
#11 system/modules/core/modules/Module.php(154): Contao\ModuleArticle->compile()
#12 system/modules/core/modules/ModuleArticle.php(50): Contao\Module->generate()
#13 system/modules/core/library/Contao/Controller.php(405): Contao\ModuleArticle->generate(false)
#14 system/modules/core/library/Contao/Controller.php(269): Contao\Controller::getArticle(Object(Contao\ArticleModel), false, false, 'main')
#15 system/modules/core/pages/PageRegular.php(129): Contao\Controller::getFrontendModule('0', 'main')
#16 system/modules/core/controllers/FrontendIndex.php(250): Contao\PageRegular->generate(Object(Contao\PageModel), true)
#17 index.php(20): Contao\FrontendIndex->run()
#18 {main}
Wahrscheinlich für die Erfahrenen unter Euch nur ein müdes Lächeln wert.
Lesezeichen