To enable Foundry to output a Content Item of specific content type two things must be available: One or more layout template associated with the content type and appropriate template tags to display to informations of the content item from the data tree.
Foundry provides a general tag show-property
which can be used to output properties of a content type. For simple types this maybe
sufficent. The name of the property can
be found out from the XML output which can be viewed by adding the parameter
output=xml to an URL.
For more complex types or if the value of the property should be formatted in a special
way it is maybe necessary to implement some new template tags. Tags which part of the
official distribution of Foundry are found in the
foundry/lib/template-tags/content-items directory. Custom extensions can
be put into the user directory (not supported yet).
For each content type there should be a separate file named after the content type.
A relatively simple example is the NewsItem type. In this case the
date of the news needs some formatting. The news.xsl file provides the tag
news-date which allows the template author to choose the format of the
date.
A more complex example is the MultiPartArticle type. The type needs some templates for creating the menu with the sections etc. The tags for are evaluating the data tree and creating the menu.
One important rule is that the template tags should not create any HTML. They should only provided the necessary informations and output the values of properties. HTML is only generated by the HTML tags provided by Foundry. A template tag for a content type may enclose several HTML elements which are used to define the HTML output.