Skip to content

Instantly share code, notes, and snippets.

@garvinhicking
Last active October 25, 2023 14:57
Show Gist options
  • Save garvinhicking/3c33c555174142f53ba5e5b879550d94 to your computer and use it in GitHub Desktop.
Save garvinhicking/3c33c555174142f53ba5e5b879550d94 to your computer and use it in GitHub Desktop.
FlashMessage.html
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
data-namespace-typo3-fluid="true">
<f:flashMessages as="flashMessages">
<f:if condition="{flashMessages}">
<ul class="typo3-messages">
<f:for each="{flashMessages}" as="flashMessage">
<li class="alert {f:if(condition: '{flashMessage.severity} == 0', then: 'alert-success', else: 'alert-warning')}">
<p class="alert-message">
<f:comment>MAKE SURE no user-specified content is added here without CUSTOM escaping!!!</f:comment>
<f:format.raw>{flashMessage.message}</f:format.raw>
</p>
</li>
</f:for>
</ul>
</f:if>
</f:flashMessages>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment