Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idea: Allow error/notice message with the redirect tag #3625

Merged
merged 4 commits into from
Jan 15, 2019
Merged

Idea: Allow error/notice message with the redirect tag #3625

merged 4 commits into from
Jan 15, 2019

Conversation

ostark
Copy link
Contributor

@ostark ostark commented Jan 14, 2019

I stumbled about this requirement today
https://craftcms.stackexchange.com/questions/29094/how-do-you-set-a-flash-message-in-the-template-in-craft-3

Since a flash massage is usually bound to a redirect, it might be a good addition to the {% redirect %} tag.

This PR adds the option to set a error or notice message with the following syntax:

{% redirect '/some-url' with notice 'Something good happend.' %}
{% redirect '/some-url' with error 'Something bad happend.' %}

@brandonkelly brandonkelly changed the base branch from develop to 3.1 January 15, 2019 00:19
@brandonkelly brandonkelly merged commit 0869136 into craftcms:3.1 Jan 15, 2019
@brandonkelly
Copy link
Member

Good idea – merged for Craft 3.1!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants