Git Product home page Git Product logo

pyrostreams-page-field-type's Introduction

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

  • Adding proper data check to pre_output_plugin

2.0 - April 18, 2013

  • Now compatible with PyroCMS 2.2.x
  • Adding more available variables, including the anchor variable (see below)

1.2 - January 17, 2011

  • [New] Added current variable that returns true/false whether the current page is the selected page.

1.1.1 - December 15, 2011

  • [Bug] Fixed bug where when editing an entry with a page field, the page field would not show the selected page as selected

1.1 - December 13, 2011

  • [Updated] Updated to be compatible with PyroCMS 2.0 and PyroStreams 2.1
  • [New] Added drop down that displays page hierarchy.
  • [New] Added a link to the PyroCMS page edit page when displaying page name on the back end.
  • [Improvement] Field now obeys is_required setting for assignment.

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.

pyrostreams-page-field-type's People

Contributors

adamfairholm avatar dibeja avatar hugomrdias avatar thinkgraphical avatar psaunders avatar

Stargazers

Lungoupao Khongsai avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.