Ergebnis 1 bis 2 von 2

Thema: Ausgabe eines Attributes Typ "Video/Audio" im Templ. "mod_iso_productreader.html5"

  1. #1
    Contao-Nutzer Avatar von stephangunnar
    Registriert seit
    12.11.2009.
    Ort
    Wiesbaden
    Beiträge
    187

    Standard Ausgabe eines Attributes Typ "Video/Audio" im Templ. "mod_iso_productreader.html5"

    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.
    Meine aktuellen Projekte :
    http://sadhya.stephanmichel.de Contao Core (3.5.X) mit Contao Bootstrap (1.0.0)
    http://das6040.de Contao Core (3.5.X) mit Contao Bootstrap (1.0.0)

  2. #2
    Contao-Urgestein Avatar von Toflar
    Registriert seit
    15.06.2009.
    Beiträge
    4.467
    Partner-ID
    8667
    User beschenken
    Wunschliste

    Standard

    Die Methode "generateAttribute" steht nur im Isotope-Scope zur Verfügung. Also mehr oder weniger in Produkt-Detail- ("'iso_reader_*") und Produkt-Listen-Templates ("iso_list_*") und Produkt-Sammlungs-Templates ("iso_collection*").
    Du befindest dich aber im Modul-Template wo kein Bezug zum aktuellen Produkt besteht. Du musst das im entsprechenden "iso_reader_*"-Template machen.
    Contao Core-Entwickler @terminal42 gmbh
    Wir sind Contao Premium-Partner!
    Für Individuallösungen kannst du uns gerne kontaktieren.
    PS: Heute schon getrakked?

Aktive Benutzer

Aktive Benutzer

Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)

Lesezeichen

Lesezeichen

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •