Skip to content

Commit

Permalink
Correctly add element classes to new Twig template (#169)
Browse files Browse the repository at this point in the history
Co-authored-by: Martin Auswöger <[email protected]>
  • Loading branch information
aschempp and ausi authored Jul 31, 2024
1 parent 5cca0c0 commit 66278b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Element/CustomElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ private function addFragmentControllerDefaults()
$this->Template->section ??= $this->strColumn;
$this->Template->properties ??= [];
$this->Template->element_html_id ??= $this->Template->cssID[0] ?? null;
$this->Template->element_css_classes ??= $this->Template->cssID[1] ?? '';
$this->Template->element_css_classes ??= trim(($this->Template->cssID[1] ?? '') . ' ' . implode(' ', $this->objModel ? (array) $this->objModel->classes : []));

if (
(!\is_string($this->Template->headline) && $this->Template->headline !== null)
Expand Down

0 comments on commit 66278b4

Please sign in to comment.