Templates does four things:

1) Provides a customized interface to the page editor
2) Restricts what page-parts may appear on a page of that type
3) Hides and consolidates design aspects about how parts of the page will be rendered
4) Auto-selects/restricts the page-class (Archive, File Not Found, etc).

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 <r:content /> tag within the layout to accomplish this.

Does this answer your question?

Sean

p.s. Digital Pulp (Josh, Justin & friends) prefer to call them content-types and thus renamed them as such in their internal version of this extension.

Nate Turnage wrote:
Is there a tutorial or some sort of example of how the templates extension
works in practice? There is some info in the readme but there aren't any
examples of how it works. It looks like a way to create a page that is
simply a collection of snippets.

What I thought it was is a way to have nested partials, but that doesn't
seem to be the case.


~Nate
_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to