I wrote a PHP script to deploy data to live-cdn and included a "deploy" button on the dashboard. the script returns ?success=true, and i need to show div element with "Congratulations"

i tried this with no success:

{% if app.request.query.get('success') %}
    Glückwunsch! Deployment läuft.
{% endif %}

2 Answers 2



{% if craft.request.getQueryString('success') %}



Actually, reading from the Craft 2 docs it's:

craft.request.getQueryString()      // returns the whole query string
craft.request.getQuery('success')   // returns only the value of 'success'
  • 4
    Thank you, Antoine, that was helpful. And in Craft 3 it seems to now be craft.app.request.getQueryParam() otherwise a deprecation error.
    – kr37
    Jan 20, 2019 at 6:12
  • 4
    @kr37 Cool! I suggest you turn your comment into a standalone answer, that would be helpful for Craft 3 users. I updated my answer to indicate that it applies to Craft 2.
    – antoine
    Jan 22, 2019 at 2:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.