Answers.Body: <p>This isn't possible because the <code>#hash</code>-part isn't even send to the server. See this question on StackOverflow: <a href="https://stackoverflow.com/q/940905/3589841">Can PHP read the hash portion of the URL?</a></p>
  
  <p>But if you use <code>?hash=something</code> instead, these functions will help you: <a href="http://buildwithcraft.com/docs/templating/craft.request#getParam" rel="nofollow noreferrer"><code>getParam()</code></a> and <a href="http://buildwithcraft.com/docs/templating/craft.request#getQuery" rel="nofollow noreferrer"><code>getQuery()</code></a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-08-04T19:00:18.367Z
Answers.LastActivityDate: 2014-08-04T19:00:18.367Z
Answers.LastEditDate: 2017-05-23T12:38:53.957Z
Answers.UserDisplayName: Victor
Body: <p>Is there a method or recommended way of grabbing URL hash parameters with Twig? </p>
  
  <p>For example, if my URL is <a href="http://mysite.com/my-page#hash" rel="noreferrer">http://mysite.com/my-page#hash</a>, is there a way to grab the hash?</p>
  
Tags: <templating><url>
Title: Method to grab URL hash in Twig or craft.request?
ThreadText: # Method to grab URL hash in Twig or craft.request?
  
  (Asked by: username_0 on 2014-08-04)
  
  Is there a method or recommended way of grabbing URL hash parameters with Twig?
  
  For example, if my URL is <http://mysite.com/my-page#hash>, is there a way to grab the hash?
  
  **Tags:** templating, url
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2014-08-04. Score: 8 | Accepted answer
  
  This isn't possible because the `#hash`-part isn't even send to the server. See this question on StackOverflow: [Can PHP read the hash portion of the URL?](https://stackoverflow.com/q/940905/3589841)
  
  But if you use `?hash=something` instead, these functions will help you: [`getParam()`](http://buildwithcraft.com/docs/templating/craft.request#getParam) and [`getQuery()`](http://buildwithcraft.com/docs/templating/craft.request#getQuery)
  
  
  ---
  
  