Skip to content

Commit

Permalink
removed dump, updated parser logic
Browse files Browse the repository at this point in the history
  • Loading branch information
j25j5 committed Apr 29, 2024
1 parent 26bb5b0 commit 7366b2f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions src/EventListener/ParseFrontendTemplateListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ public function __invoke(string $buffer, string $templateName, FrontendTemplate
$GLOBALS['objPage'] = PageModel::findByPk($b->trail[0]);
}
}

//leaving it in for now, but has been made obsolete according to comment here: https://github.com/contao/contao/pull/3622#issuecomment-971806487
//$objIt = new InsertTags();
//$buffer = $objIt->replace($buffer, true);
$buffer = System::getContainer()->get('contao.insert_tag.parser')->replace($buffer);
}

return $buffer;
Expand Down
5 changes: 1 addition & 4 deletions src/EventListener/ParseTemplateListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ class ParseTemplateListener
{
public function __invoke(Template $template): void
{
var_dump($template->getName());
if ('be_main' === false) {
// modify only if we're not in any action mode, popup or dynamic context
// modify only if there is no HTML content element involved
Expand All @@ -25,9 +24,7 @@ public function __invoke(Template $template): void
AND strpos($buffer, '<div class="cte_type published">HTML</div>') === false
AND strpos($buffer, '<div class="cte_type unpublished">HTML</div>') === false
){
// var_dump('Backend Insert Tags loaded'); exit;
$objIt = new InsertTags();
$buffer = $objIt->replace($buffer, true);
$buffer = System::getContainer()->get('contao.insert_tag.parser')->replace($buffer);
}
}

Expand Down

0 comments on commit 7366b2f

Please sign in to comment.