Skip to content

Commit

Permalink
[FEATURE] Forward rendering context in VariablesViewHelper
Browse files Browse the repository at this point in the history
It is now possible to use viewhelpers in emails, that require the
server request. For example the cObjectViewhelper.

Resolves: in2code-pro/powermail#94
  • Loading branch information
mschwemer committed Feb 2, 2024
2 parents 31095f8 + f209418 commit d7fbf5d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Classes/ViewHelpers/Misc/VariablesViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public function render(): string
$function = $this->arguments['function'];
$mailRepository = GeneralUtility::makeInstance(MailRepository::class);
$parseObject = GeneralUtility::makeInstance(StandaloneView::class);
$parseObject->setRenderingContext($this->renderingContext);
$parseObject->setTemplateSource($this->removePowermailAllParagraphTagWrap($this->renderChildren()));
$parseObject->assignMultiple(
ArrayUtility::htmlspecialcharsOnArray($mailRepository->getVariablesWithMarkersFromMail($mail))
Expand Down

0 comments on commit d7fbf5d

Please sign in to comment.