Navigation Menu

Skip to content

seancribbs/radiant-templates-extension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Templates

Revision History

  • Radiant 0.8 compatible and tested, May 2010
  • Refactored to standard structure under /admin, admin UI for Part Types added, backward compatibility to < 0.8, by Andrew vonderLuft, November 2009,
  • Refactored by Sean Cribbs, August 2008
  • Radiant 0.7 Compatible, March 2009
  • Created by Sean Cribbs, September 2007

Templates provide internal structure to Radiant pages to create an extra layer
of flexibility in Layout development. This is accomplished by:

  • Specifying the Layout and page class that will be used by pages with a
    given template
  • Specifying the parts and their filters that will be editable in the
    page interface
  • Specifying the “type” of each part, allowing customization of the editing
    UI
  • Adding a popup menu to the site map in which a template for a new
    page can be chosen

The templates extension requires Radiant 0.6.7 or later, preferred 0.6.9 or
later. It has worked with earlier versions of Radiant, but is not guaranteed
to run on them and would require the “shards” extension.

Usage

For example, let’s say I have a template for press releases. Press
releases consist of a short description (that also serves as the first
paragraph), a longer description, a location, contact information, and
standard info about the company. So I might set up a template like so:

Location: One-line
Short description: One-line
Long description: Plain textarea [Textile]
Contact information: Plain textarea

Then I would set the structure (which becomes the ‘body’ page-part) to
be something like:

<div class="press-release">
<p class="contact"><r:content part="Contact information" /></p>
<p><strong><r:date format="%d %m %Y"/>,  <r:content part="Location"
/></strong> - <r:content part="Short description" /></p>
<r:content part="Long description" />
<r:snippet name="corporate-press-release-blurb" />
</div>

This allows my Layout to serve as a wireframe for the whole site, with
many different page designs filling the “content well”. I would only
need a single tag within the layout to accomplish this.

Acknowledgments

Thanks to Digital Pulp for funding the initial development of this extension
for use in the Redken project, and to Con-way for funding further
development.