Difference between revisions of "Liquid Template Variables - page"

From Spiffy Stores Knowledge Base

Line 32: Line 32:
  
 
Return the number of images associated with this page. As pages do not support associated images at this stage, the value of 0 is always returned.
 
Return the number of images associated with this page. As pages do not support associated images at this stage, the value of 0 is always returned.
 +
 +
== <code>page.metafields</code> ==
 +
 +
Return the [[Liquid Template Variables - metafields|metafields]] for the page.
 +
 +
Metafields can only be managed using the Spiffy Stores API.

Revision as of 15:01, 20 February 2015

The Liquid template variable page has the following attributes:

page.id

Returns the unique internal number of the page.

This is normally only for internal usage.

page.handle

This is the page handle. The handle uniquely identifies the page in the URL address.

The handle is usually the page's title in lower case with all blanks replaced by a dash. "My Pretty Page" would have the handle "my-pretty-page".

page.title

Returns the title of this page.

page.content

Returns the content of this page.

page.url

The is the relative URL address of the page.

page.type

Returns the type of the object, in this case, 'page'.

page.images_count

Return the number of images associated with this page. As pages do not support associated images at this stage, the value of 0 is always returned.

page.metafields

Return the metafields for the page.

Metafields can only be managed using the Spiffy Stores API.