tactile-broker v1.0.4
Tactile broker
Tactile Broker will render a json structure of well formatted pages and components, given a set of page and component implementations. Tactile Broker also enhances the json data structure with parent and child pointers among others. It uses mustache as a templating language.
Usage
Access a property off of the current json object:
{{someProperty}}
The path to the current json object:
{{path}}
Access the parent json object:
{{parent.path}}
Retrieve the current page:
{{page.title}}
Retrieve the parent of the current page:
{{page.parent.title}}
Access the home page:
{{page.home.title}}
Access the children of the current page:
{{#page.children}}
<div>{{title}}</div>
{{/page.children}}
Access the siblings of the current page:
{{#page.siblings}}
<div>{{title}}</div>
{{/page.siblings}}
Access the children of the current pages parent page:
{{#page.parent.children}}
<div>{{title}}</div>
{{/page.parent.children}}
Access the home pages children:
{{#page.home.children}}
<div>{{title}}</div>
{{/page.home.children}}
Access the home pages siblings:
{{#page.home.siblings}}
<div>{{title}}</div>
{{/page.home.siblings}}
Render the "header" json object. This will be a child of the current json object. It's compType will be used to determine how it will be rendered.
{{render "header"}}
Render the current json object as the component type given in the second parameter. That is, render the current json object as a "footer".
{{render false "footer"}}
Render the current object based upon the component type listed in the "compType" property.
{{render false compType}}