Difference between revisions of "Liquid Template Variables - request"
From Spiffy Stores Knowledge Base
Line 5: | Line 5: | ||
You can access any request parameter by name. | You can access any request parameter by name. | ||
− | For example, | + | For example, a URL can include a parameter: |
<pre>http://storedemo.spiffystores.com/?theme=blue</pre> | <pre>http://storedemo.spiffystores.com/?theme=blue</pre> |
Revision as of 16:49, 16 September 2008
The liquid template variable request has the following attributes:
request.parameter
You can access any request parameter by name.
For example, a URL can include a parameter:
http://storedemo.spiffystores.com/?theme=blue
This theme parameter can be accessed by
request.theme
request.host
Returns the host name portion of the URL request.
For example, if we go to http://storedemo.spiffystores.com, then the request.host returns:
storedemo.spiffystores.com
request.remote_ip
Returns the IP address of the client accessing the page.