Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion docs/manual/layout/templates/php/template-inheritance.de.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ angegeben und ihre Inhalte überschrieben werden.

Mittels `$this->parent()` lässt sich der originale Inhalt des Blocks ausgeben.

#### Beispiel
#### Beispiel 1
Das Template `fe_page.html5` ist in mehrere Blöcke aufgeteilt (u. a. `head`, `meta`, `body`, `footer`).
Wir möchten lediglich eine weitere Meta-Angabe hinzufügen – dazu schreiben wir unser Template wie folgt:

Expand All @@ -32,3 +32,25 @@ Wir möchten lediglich eine weitere Meta-Angabe hinzufügen – dazu schreiben w
<meta name="author" content="Max Muster">
<?php $this->endblock(); ?>
```

#### Beispiel 2
Möchte man den [TinyMCE-Editor](../../anleitungen/tinymce-konfiguration/) grundlegend oder eigene Ableitungen
anpassen, so sollten nur die entsprechenden Blöcke überarbeitet werden werden. Um zu ermitteln, welche
Blöcke zur Verfügung stehen, sieht man sich am besten das Originaltemplate `be_tinyMCE.html5` an.
Folgend ein Beispiel für eine Anpassung als `be_tinyMCE_Redakteure.html5`:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This requires additional knowledge about DCA adjustments. If you just want to generally customize the TinyMCE, you should just adjust the be_tinyMCE.html5 template. For the purpose of this example I would not create a variant that you'd have to specifically enable then in the respective DCAs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's why I linked to the TinyMCE page...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but there is no point for this simple example to make it more complicated than it needs to be in my opinion.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


```php
<?php $this->extend('be_tinyMCE'); ?>

<?php $this->block('valid_elements'); ?>
extended_valid_elements: 'q[cite|class|title]',
<?php $this->endblock(); ?>

<?php $this->block('menubar'); ?>
menubar: '',
<?php $this->endblock(); ?>

<?php $this->block('toolbar'); ?>
toolbar: 'code',
<?php $this->endblock(); ?>
```