Using existing Template Two
(→Template Two Style) |
(→Template Two Configuration) |
||
Line 79: | Line 79: | ||
=== Template Two Configuration === | === Template Two Configuration === | ||
− | This resource type allows to configure the layout | + | This resource type allows to configure the layout. It can be used a three column layout (Column left+right) and a two column layout (Column left), this is the default layout. It is possible to arrange boxes in the selected layout, for example Template two textboxes. Therefore, in the "Configuration" node in the xml content can be created elements. Per element following attributes are to choose: |
*a box in the VFS, for example a Template two textbox | *a box in the VFS, for example a Template two textbox |
Revision as of 14:17, 10 December 2009
Assumption:
To use the template Template Two the module org.opencms.frontend.templatetwo has to be installed.
There are following Template Two resource types:
- Template Two Article
- Template Two News
- Template Two Item
- Template Two Event
- Template Two Style
- Template Two Search Page
- Template Two Options
- Template Two Preset
- Template Two Linkbox
- Template Two Configuration
- Template Two Textbox
- Template Two Listbox
These resource types are to create in the OpenCms Explorer View with the New button and the choose from Template Two. In the following the handling of these resource types is described.
Template Two resource types
In this chapter the Template Two resource types are described.
Template Two Article
The Template Two Article gives functionality to define an article with a title and different paragraphs. One paragraph consists of a headline, the text, images and links. An article allows to define layout configurations in the tab "Configuration". This functionality accords the functionality of the Template Two Configuration.
Template Two News
The Template Two News gives functionality to define news with date, title, teaser, different paragraphs and the author data. One paragraph consists of a headline, the text, images and links.
Template Two Item
The Template Two Item gives functionality to define an item with a name, a category, a description, images and links. An item allows to define layout configurations in the tab "Configuration". This functionality accords the functionality of the Template Two Configuration.
Template Two Event
The Template Two Event gives functionality to define an event with a title, a teaser, a date and different paragraphs. One paragraph consists of a headline, the text, images and links. An event allows to define layout configurations in the tab "Configuration". This functionality accords the functionality of the Template Two Configuration.
Template Two Style
A Template Two Style allows to define style settings. To use the Template Two Style file on a resource, in the property 'style.layout' on the resource the site path to the Template Two Style resource is to set.
Template Two Search Page
With the template two search page can be created a search page. This includes the text which is shown in the search input form. Also text result text and the error text are to configure.
Template Two Options
A template two options contains following elements:
- Top Navigation
- Header
- Footer
To use the Template Two Options file on a resource, on the property 'style.options' on this resource the site path to the Template Two Options resource is to set.
Template Two Preset
A template two preset consists of following elements:
- Left Column - Visibility
- Left Column - Width
- Right Column - Visibility
- Right Column - Width
- Left Navigation - Visibility
Template Two Linkbox
A template two linkbox consists of following elements:
- Title
- Description
- Links
Template Two Configuration
This resource type allows to configure the layout. It can be used a three column layout (Column left+right) and a two column layout (Column left), this is the default layout. It is possible to arrange boxes in the selected layout, for example Template two textboxes. Therefore, in the "Configuration" node in the xml content can be created elements. Per element following attributes are to choose:
- a box in the VFS, for example a Template two textbox
- the orientation for the box (right, center, left), if there is used the two column layout only the left and center orientations shall be used
- a color schema for the box, here can be choosed between three different color schemas, these color schemas are defined in the Template Two style
Template Two Textbox
With a Template Two Textbox can be shown static text, like title and text. The Template Two Textbox can be integrated in Template Two Articles, Template Two Items and Template Two Events.
Template Two Listbox
With the linkbox resources are shown which are collected with a OpenCms resource collector, for example the collector "allInFolder". A template two listbox consists of following elements:
- Title
- Text
- Image
- AdditionalLink
- Links
- Collector
- Parameter, this are the parameters to the selected folder, example: the collector "allInFolder" needs the parameters in the format <folder>|resource type|number of resources
- Detail Link Text
- Position - Author
- Position - Date
- Position - Image
- Mapping
The Template Two Listbox can be integrated in Template Two Articles, Template Two Items and Template Two Events.
Usage examples of the template two resource types
In this chapter are shown some usage examples of the template two elements.
'Hello World' example
To produce a 'Hello World' example in the standard Template Two layout, following is to do to:
- Create a Jsp with following content:
<%@ page session="false" %> <%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %> <cms:include property="template" element="head" /> Hello World <cms:include property="template" element="foot" />
- Set the template property to /system/modules/org.opencms.frontend.templatetwo/templates/main.jsp