Answers.Body: <p>You can set <code>postLogoutRedirect</code> in your <code>config/general.php</code> (<a href="https://craftcms.com/docs/3.x/config/config-settings.html#postlogoutredirect" rel="nofollow noreferrer">docs</a>) to redirect your users to a specific page, something like <code>'postLogoutRedirect' =&gt; 'your-page'</code></p>
  <p>If you want to use an existing page, say your homepage, and display an alert you could set <code>'postLogoutRedirect' =&gt; '/?loggedout'</code> and check for it in your template using:</p>
  <pre class="lang-twig prettyprint-override"><code>{% if craft.app.request.getParam('loggedout') is not null %}
      &lt;p&gt;You have been logged out&lt;/p&gt;
  {% endif %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-24T19:46:20.307Z
Answers.Text: Is there a way to pass a unique message through to the target page? I wasn't clear on flash messages either. {% set flashMsg = 'You have just successfully done a thing.' %}
Answers.UserDisplayName: 4midori
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-17T07:17:49.377Z
Answers.LastActivityDate: 2021-02-17T07:17:49.377Z
Answers.UserDisplayName: Oli
Body: <p>I have looked through previous questions and answers, but don't see the following clearly explained.</p>
  <p>When my users visit <em>/logout</em>, they are successfully logged out and redirected to the website's homepage.</p>
  <p>What is not clear to me is how I can detect that action, and display some HTML saying they have been successfully logged out.</p>
  
Tags: <form><action><flash>
Title: Display message on logout (flash?)
ThreadText: # Display message on logout (flash?)
  
  (Asked by: username_0 on 2021-02-16)
  
  I have looked through previous questions and answers, but don't see the following clearly explained.
  
  When my users visit */logout*, they are successfully logged out and redirected to the website's homepage.
  
  What is not clear to me is how I can detect that action, and display some HTML saying they have been successfully logged out.
  
  **Tags:** form, action, flash
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-02-17. Score: 3 | Accepted answer
  
  You can set `postLogoutRedirect` in your `config/general.php` ([docs](https://craftcms.com/docs/3.x/config/config-settings.html#postlogoutredirect)) to redirect your users to a specific page, something like `'postLogoutRedirect' => 'your-page'`
  
  If you want to use an existing page, say your homepage, and display an alert you could set `'postLogoutRedirect' => '/?loggedout'` and check for it in your template using:
  
  ```twig
  {% if craft.app.request.getParam('loggedout') is not null %}
      <p>You have been logged out</p>
  {% endif %}
  
  ```
  
  > **Comments:**
  > **username_0**: Is there a way to pass a unique message through to the target page? I wasn't clear on flash messages either. {% set flashMsg = 'You have just successfully done a thing.' %}  
  
  ---
  
  