Hallo,
Contao 5.3, lokal Laragon
RSCE:
PHP-Code:
<?php
return[
'label' => ['Breadcrumb Navigation Seitentitel','Erstellt ein Navigationselement für Unterseiten'],
'types' => ['content'],
'standardFields' => ['cssID'],
'contentCategory' => 'texts',
'fields' => [
'headline' => [
'label' => ['Überschrift','Hier können Sie eine Überschrift eingeben.'],
'inputType' => 'text',
'eval' => [
'tl_class' => 'clr w50',
'allowHtml' => true,
],
],
'subheadline' => [
'label' => ['Unterüberschrift','Hier können Sie eine Unterüberschrift eingeben.'],
'inputType' => 'text',
'eval' => [
'tl_class' => 'w50',
'allowHtml' => true,
],
],
],
];
Twig Template:
PHP-Code:
...
<div class="page-title-content">
<h1>{{ headline }}</h1>
<span>{{ subheadline }}</span>
</div>
...
headline und subheadline werden als HTML ausgegeben - also z.B. als <a href="#">my content</a>.
Muss ich bei der Ausgabe der Variablen bei Twig noch zusätzlich etwas beachten, sodass 'allowHtml' => true, auch tatsächlich greift?
Lesezeichen