Verwendung: Bildausgabe mit Twig-Template

Philipp's Avatar

Philipp

26 Mar, 2024 02:44 PM

Produkt: Custom Elements Contao
Contao-Version: 5.3.3

Hallo,
stelle gerade meine Templates auf/mit Twig um und bekomme es einfach nicht hin, nicht einmal mit Hilfe von Spooky aus dem Forum, hoffentlich wisst einen Rat.

Es geht schlichtweg um die einfache Ausgabe einer rsce_config mit folgendem Inhalt:

....
      'image' => array(
        'label' => array('Bild', ''),
        'inputType' => 'fileTree',
        'eval' => array(
          'fieldType' => 'radio',
          'filesOnly' => true,
          'extensions' => 'svg,jpg,jpeg,png',
          'tl_class' => 'clr',
          'mandatory' => true
        )
      ), 
....

wie muss das dazugehörige twig-template aussen, da:
{{ figure() }} bzw. {{ contao_figure() }} scheitern.
Post im Forum:
https://community.contao.org/de/showthread.php?86421-Twig-Template-...

Dankbar für jeden Tipp
Phil

  1. Support Staff 1 Posted by RockSolid Theme... on 26 Mar, 2024 03:40 PM

    RockSolid Themes's Avatar

    Vielen Dank für Ihre Frage.

    {{ figure() }} bzw. {{ contao_figure() }} scheitern.

    Wie genau scheitert die Ausgabe mit {{ contao_figure(box.image, 58) }} ?
    Erscheint eine Fehlermeldung?
    Wenn ja, wie lautet sie?

  2. 2 Posted by Philipp Kayser on 26 Mar, 2024 04:27 PM

    Philipp Kayser's Avatar

    Hallo,

    {{ figure() }} scheitert, {{ contao_figure() }} funktioniert.
    Tut mir leid, ich dachte, wir hätten beides probiert.

    Nochmals vielen Dank und sorry für die Umstände
    Phil

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac