Answers.Body: <p>It can be done with some Twig code:</p>
  
  <pre class="lang-twig prettyprint-override"><code>{% set referrer = craft.request.urlReferrer %}
  
  {% if referrer %}
      {# Remove everything before the `?` #}
      {% set queryString = referrer|replace('/^.*\\?/', '') %}
  
      {# Split the query string into individual params #}
      {% set params = queryString|split('&amp;') %}
  
      {% for param in params %}
          {# Split this param on the `=` sign #}
          {% set parts = param|split('=') %}
          {% set name = parts[0] %}
          {% set value = parts[1] is defined ? parts[1] %}
  
          {# Do something with it... #}
      {% endfor %}
  {% endif %}
  </code></pre>
  
  <p>Note that this could would require Craft 2.2 or later, which comes with a regex-enabled <a href="http://buildwithcraft.com/docs/templating/filters#replace" rel="nofollow">replace</a> filter.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-09-12T13:43:25.843Z
Answers.Text: Awesome, thank you so much! Had an inkling that this would require some regex wizardry, that world does somewhat scare me though...
  Clever breadcrumbs here I come, woooooo!
Answers.UserDisplayName: Katrin
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-09-12T16:27:23.357Z
Answers.Text: @Katrin The regex bit wasn’t totally necessary, just saved a couple additional lines of code :)
Answers.UserDisplayName: Brandon Kelly
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-09-11T17:15:25.820Z
Answers.LastActivityDate: 2014-09-12T16:26:43.230Z
Answers.LastEditDate: 2014-09-12T16:26:43.230Z
Answers.UserDisplayName: Brandon Kelly
Body: <p>Is there a way to get the parameters from the referrer url?</p>
  
  <p>I've tried this:
  <code>{{ craft.request.urlReferrer.getQuery }}</code>
  but that’s not working.</p>
  
Tags: <url><request>
Title: Get parameters from referrer
ThreadText: # Get parameters from referrer
  
  (Asked by: username_0 on 2014-09-11)
  
  Is there a way to get the parameters from the referrer url?
  
  I've tried this:
  `{{ craft.request.urlReferrer.getQuery }}`
  but that’s not working.
  
  **Tags:** url, request
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2014-09-11. Score: 4 | Accepted answer
  
  It can be done with some Twig code:
  
  ```twig
  {% set referrer = craft.request.urlReferrer %}
  
  {% if referrer %}
      {# Remove everything before the `?` #}
      {% set queryString = referrer|replace('/^.*\\?/', '') %}
  
      {# Split the query string into individual params #}
      {% set params = queryString|split('&') %}
  
      {% for param in params %}
          {# Split this param on the `=` sign #}
          {% set parts = param|split('=') %}
          {% set name = parts[0] %}
          {% set value = parts[1] is defined ? parts[1] %}
  
          {# Do something with it... #}
      {% endfor %}
  {% endif %}
  
  ```
  
  Note that this could would require Craft 2.2 or later, which comes with a regex-enabled [replace](http://buildwithcraft.com/docs/templating/filters#replace) filter.
  
  > **Comments:**
  > **username_0**: Awesome, thank you so much! Had an inkling that this would require some regex wizardry, that world does somewhat scare me though... Clever breadcrumbs here I come, woooooo!  
  > **username_1**: @username_0 The regex bit wasn’t totally necessary, just saved a couple additional lines of code :)  
  
  ---
  
  