adamfairholm / PyroStreams-Page-Field-Type

Pages field type for use with PyroStreams
BSD 2-Clause "Simplified" License
10 stars 9 forks source link

PyroStreams Page Field Type 2.0.1

This field type allows you to select a page from your PyroCMS page tree as a PyroStreams field.

Changelog

2.0.1 - April 19, 2013

2.0 - April 18, 2013

1.2 - January 17, 2011

1.1.1 - December 15, 2011

1.1 - December 13, 2011

Installation

If it doesn't exist exists, create a field_types folder in either _addons/ or addons/shared_addons. Create a folder called "page" in your field_types folder and add the file in this repo to that folder.

Usage

After being assigned to a stream, the following variables are available in your layouts:

Variable Notes
{{ field_slug:link }} Full URL to the page
{{ field_slug:anchor }} Anchor with full URL and title used as the anchor text.
{{ field_slug:slug }} Page URI slug
{{ field_slug:title }} Page title
{{ field_slug:id }} Page ID
{{ field_slug:status }} Page status (draft or live)
{{ field_slug:current }} Whether or not this is the current page. Returns true/false
{{ field_slug:parent_id }} ID of the parent page
{{ field_slug:entry_id }} ID of the stream entry that this page is linked to.
{{ field_slug:type_id }} ID of the page type this page is linked to.
{{ field_slug:meta_title }} Unparsed metatitle.
{{ field_slug:meta_title }} Unparsed metatitle.
{{ field_slug:meta_description }} Unparsed meta description.
{{ field_slug:comments_enabled }} Are comments enabled? 1 or 0.
{{ field_slug:status }} 'live' or 'draf'.
{{ field_slug:strict_uri }} Is this page set with a strict URI? 1 or 0.
{{ field_slug:is_home }} Is this page the home page? 1 or 0.
{{ field_slug:css }} The page CSS.
{{ field_slug:js }} The page JS.