Ergebnis 1 bis 7 von 7

Thema: Twig-Template Varianten erstellen für news_full, news_latest etc.

  1. #1
    Contao-Fan Avatar von mdoll
    Registriert seit
    25.06.2009.
    Ort
    Wietze
    Beiträge
    378

    Standard Twig-Template Varianten erstellen für news_full, news_latest etc.

    Moin,

    in der 5.7 sind ja jede Menge Templates neu als Twig-Templates dazu gekommen. Bei den Templates, die im Template-Studio unter "ohne Präfix" einsortiert sind, kann ich lediglich ein Template erstellen, aber keine Varianten (z.B. news_latest_startseite, news_latest_unterseiteA). Gibt es da eine Möglichkeit, um Varianten zu erstellen, oder muss ich da noch auf die HTML-Templates zurückgreifen?

    Danke und Grüße
    Mathias
    The idea is to die young as late as possible!

  2. #2
    Community-Moderator
    Wandelndes Contao-Lexikon
    Avatar von Spooky
    Registriert seit
    12.04.2012.
    Ort
    Scotland
    Beiträge
    38.379
    Partner-ID
    10107

    Standard

    Das müsstest du als Issue auf GitHub posten.
    » sponsor me via GitHub or Revolut

  3. #3
    Contao-Fan Avatar von mdoll
    Registriert seit
    25.06.2009.
    Ort
    Wietze
    Beiträge
    378

    Standard

    Issue erstellt:
    https://github.com/contao/contao/issues/9461

    Danke, Spooky!
    The idea is to die young as late as possible!

  4. #4
    Contao-Fan Avatar von mdoll
    Registriert seit
    25.06.2009.
    Ort
    Wietze
    Beiträge
    378

    Standard

    Moin,

    leider kann ich auch in 5.7.1 keine Varianten erstellen. Die Option taucht nach wie vor nicht auf. Zusätzlich kann ich den Quelltext eigener .html5 Templates nicht mehr bearbeiten, ich erhalte einen Internal Server Error mit der Meldung

    "Virtual filesystem path "../templates/mein-theme/mod_article.html5" must not escape the filesystem boundary."

    Stack Trace im Debug Modus:

    Code:
    OutOfBoundsException:
    Virtual filesystem path "../templates/mein-theme/mod_article.html5" must not escape the filesystem boundary.
    
      at vendor/contao/core-bundle/src/Filesystem/VirtualFilesystem.php:384
      at Contao\CoreBundle\Filesystem\VirtualFilesystem->resolve('../templates/mein-theme/mod_article.html5')
         (vendor/contao/core-bundle/src/Filesystem/VirtualFilesystem.php:89)
      at Contao\CoreBundle\Filesystem\VirtualFilesystem->write('../templates/mein-theme/mod_article.html5', '<?php if ($this->teaserOnly): ?>  <?php $this->block(\'alias\'); ?>    <article class="<?= $this->class ?> block test"<?= $this->cssID ?><?php if ($this->style): ?> style="<?= $this->style ?>"<?php endif; ?>>      <div class="tce_text block">        <h2><?= $this->headline ?></h2>        <div class="teaser">          <?= $this->cspInlineStyles($this->teaser) ?>          <p class="more"><a href="<?= $this->href ?>" title="<?= $this->readMore ?>"><?= $this->more ?> <span class="invisible"><?= $this->headline ?></span></a></p>        </div>      </div>    </article>  <?php $this->endblock(); ?><?php elseif ($this->noMarkup): ?>  <?php $this->block(\'content\'); ?>    <?= implode(\'\', $this->elements) ?>  <?php $this->endblock(); ?><?php else: ?>  <div class="<?= $this->class ?> block"<?= $this->cssID ?><?php if ($this->style): ?> style="<?= $this->style ?>"<?php endif; ?>>  	<div class="article-wrapper">    <?php if ($this->printable): ?>      <?php $this->block(\'syndication\'); ?>        <!-- indexer::stop -->        <div class="syndication">          <?php if ($this->printButton): ?>            <a href="<?= $this->print ?>" class="print" title="<?= $this->printTitle ?>" onclick="window.print();return false" data-skip-search-index><?= Contao\\Image::getHtml(\'assets/contao/images/print.svg\') ?></a>          <?php endif; ?>          <?php if ($this->pdfButton): ?>            <a href="<?= $this->href ?>" class="pdf" title="<?= $this->pdfTitle ?>" data-skip-search-index><?= Contao\\Image::getHtml(\'assets/contao/images/pdf.svg\') ?></a>          <?php endif; ?>          <?php if ($this->facebookButton): ?>            <a href="<?= $this->route(\'contao_frontend_share\', [\'p\' => \'facebook\', \'u\' => $this->encUrl]) ?>" class="facebook" rel="nofollow" title="<?= $this->facebookTitle ?>" onclick="var w=window.open(this.href,\'\',\'width=640,height=380,modal=yes,left=100,top=50,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no\');w.opener=null;return false"><?= Contao\\Image::getHtml(\'assets/contao/images/facebook.svg\') ?></a>          <?php endif; ?>          <?php if ($this->twitterButton): ?>            <a href="<?= $this->route(\'contao_frontend_share\', [\'p\' => \'twitter\', \'u\' => $this->encUrl, \'t\' => $this->encTitle]) ?>" class="twitter" rel="nofollow" title="<?= $this->twitterTitle ?>" onclick="var w=window.open(this.href,\'\',\'width=640,height=380,modal=yes,left=100,top=50,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no\');w.opener=null;return false"><?= Contao\\Image::getHtml(\'assets/contao/images/twitter.svg\') ?></a>          <?php endif; ?>        </div>        <!-- indexer::continue -->      <?php $this->endblock(); ?>    <?php endif; ?>    <?php $this->block(\'content\'); ?>      <?= implode(\'\', $this->elements) ?>    <?php $this->endblock(); ?>    <?php if ($this->backlink): ?>      <?php $this->block(\'backlink\'); ?>        <!-- indexer::stop -->        <p class="back"><a href="<?= $this->backlink ?>" title="<?= $this->back ?>"><?= $this->back ?></a></p>        <!-- indexer::continue -->      <?php $this->endblock(); ?>    <?php endif; ?>    </div>  </div><?php endif; ?>')
         (vendor/contao/core-bundle/contao/drivers/DC_Folder.php:2145)
      at Contao\DC_Folder->source()
         (vendor/contao/core-bundle/contao/classes/Backend.php:463)
      at Contao\Backend->getBackendModule('tpl_editor', null)
         (vendor/contao/core-bundle/contao/controllers/BackendMain.php:143)
      at Contao\BackendMain->run()
         (vendor/contao/core-bundle/src/Controller/Backend/BackendController.php:45)
      at Contao\CoreBundle\Controller\Backend\BackendController->mainAction()
         (vendor/symfony/http-kernel/HttpKernel.php:183)
      at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
         (vendor/symfony/http-kernel/HttpKernel.php:76)
      at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
         (vendor/symfony/http-kernel/Kernel.php:193)
      at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
         (public/index.php:42)
    Wie gehe ich vor?

    Keine Varianten erstellen in der bereits bestehenden Issue kommentieren und für das andere eine neue erstellen?

    Danke und Gruß
    Mathias
    The idea is to die young as late as possible!

  5. #5
    Community-Moderator
    Wandelndes Contao-Lexikon
    Avatar von Spooky
    Registriert seit
    12.04.2012.
    Ort
    Scotland
    Beiträge
    38.379
    Partner-ID
    10107

    Standard

    HTML5 Templates kannst du im Template Studio generell nicht bearbeiten, nur unter "Templates". Den Fehler kannst du auf GitHub melden.
    » sponsor me via GitHub or Revolut

  6. #6
    Contao-Fan Avatar von mdoll
    Registriert seit
    25.06.2009.
    Ort
    Wietze
    Beiträge
    378

    Standard

    Danke, Spooky.

    Ich meinte das Bearbeiten unter Templates. Genau da erhalte ich den Fehler.
    The idea is to die young as late as possible!

  7. #7
    Community-Moderator
    Wandelndes Contao-Lexikon
    Avatar von Spooky
    Registriert seit
    12.04.2012.
    Ort
    Scotland
    Beiträge
    38.379
    Partner-ID
    10107

    Standard

    Ah, ja dann das auch als separates Issue melden, wenn das in einer frischen Contao 5.7.1 Installation nachvollziehbar ist.
    » sponsor me via GitHub or Revolut

Aktive Benutzer

Aktive Benutzer

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

Berechtigungen

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