Open
Conversation
adiati98
requested changes
Jan 9, 2026
Contributor
There was a problem hiding this comment.
Hi @andersonjeccel,
Sorry for the super late review!
Is this docs for Mautic 7 or 5? If it's for 7, we need to rebase this once we have the 7.x branch.
Also, I've left some suggestions here. Please let me know if you have any question or need help. Thank you. ✨
Comment on lines
+6
to
+7
| Backend (PHP) implementation | ||
| **************************** |
Contributor
There was a problem hiding this comment.
Let's use dash instead of parantheses for consistency across docs.
Suggested change
| Backend (PHP) implementation | |
| **************************** | |
| Backend - PHP - implementation | |
| ****************************** |
| // Error message | ||
| $this->addFlashMessage('mautic.core.error.generic', [], 'error'); | ||
|
|
||
| The first parameter is the translation key, the second is an array of parameters for the translation, and the third is the message type (default is ``notice``). |
Contributor
There was a problem hiding this comment.
Suggested change
| The first parameter is the translation key, the second is an array of parameters for the translation, and the third is the message type (default is ``notice``). | |
| The first parameter is the translation key, the second is an array of parameters for the translation, and the third is the message type - default is ``notice``. |
Comment on lines
+25
to
+26
| Frontend (JavaScript) implementation | ||
| ************************************ |
Contributor
There was a problem hiding this comment.
Suggested change
| Frontend (JavaScript) implementation | |
| ************************************ | |
| Frontend - JavaScript - implementation | |
| ************************************** |
Comment on lines
+35
to
+38
| Create the flash message using one of these helper functions: | ||
| - Mautic.addFlashMessage(message) - Generic flash message | ||
| - Mautic.addInfoFlashMessage(message) - Info/success flash message | ||
| - Mautic.addErrorFlashMessage(message) - Error flash message |
Contributor
There was a problem hiding this comment.
Let's tidy up the format and use asterisks.
Suggested change
| Create the flash message using one of these helper functions: | |
| - Mautic.addFlashMessage(message) - Generic flash message | |
| - Mautic.addInfoFlashMessage(message) - Info/success flash message | |
| - Mautic.addErrorFlashMessage(message) - Error flash message | |
| Create the flash message using one of these helper functions: | |
| * ``Mautic.addFlashMessage(message)`` - Generic flash message | |
| * ``Mautic.addInfoFlashMessage(message)`` - Success info flash message | |
| * ``Mautic.addErrorFlashMessage(message)`` - Error flash message |
| - Mautic.addInfoFlashMessage(message) - Info/success flash message | ||
| - Mautic.addErrorFlashMessage(message) - Error flash message | ||
|
|
||
| Pass the result to Mautic.setFlashes() to display it. |
Contributor
There was a problem hiding this comment.
We use double bacticks for inline code.
Suggested change
| Pass the result to Mautic.setFlashes() to display it. | |
| Pass the result to ``Mautic.setFlashes()`` to display it. |
Contributor
|
@escopecz, can you please help to review the content? TIA! ✨ |
escopecz
reviewed
Jan 12, 2026
| Frontend (JavaScript) implementation | ||
| ************************************ | ||
|
|
||
| Add your translation strings to ``{bundle}/Translations/en_US/javascript.ini``: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This doc teaches how to implement a flash message (temporary at top right corner of the screen) using Mautic functions