Liquid Template Variables - pages: Difference between revisions
From Spiffy Stores Knowledge Base
New page: The liquid variable '''pages''' contains a collection of all of this store's pages. You can access any page by using the page handle to index the '''pages''' variable. <pre><h1>{{ pages... |
No edit summary |
||
| Line 1: | Line 1: | ||
The liquid variable '''pages''' contains a collection of all of | The liquid variable '''pages''' contains a collection of all of the store's [[Liquid_Template_Variables_-_page|pages]]. | ||
You can access any page by using the page handle to index the '''pages''' variable. | You can access any page by using the page handle to index the pages contained within the '''pages''' variable. | ||
<pre><h1>{{ pages.about.title }}</h1> | <pre><h1>{{ pages.about.title }}</h1> | ||
Revision as of 17:22, 12 September 2008
The liquid variable pages contains a collection of all of the store's pages.
You can access any page by using the page handle to index the pages contained within the pages variable.
<h1>{{ pages.about.title }}</h1>
<p>{{ pages.about.author }} says...</p>
<div>{{ pages.about.content }}</div>
This example allows you to access the content of the about page.
This can be used to "imbed" pages within any other template, or even the layout.