Liquid Template Variables - request: Difference between revisions

From Spiffy Stores Knowledge Base
Jump to: navigation, search
Admin (talk | contribs)
No edit summary
Admin (talk | contribs)
Line 5: Line 5:
You can access any request parameter by name.
You can access any request parameter by name.


For example, if a URL includes a parameter:
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 17: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.