Using existing Template Two

From OpenCms Wiki
Revision as of 16:48, 2 December 2009 by Alkacon (Talk | contribs)
Jump to: navigation, search

Contents

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

Following elements belong to a template two article:

  • Title
  • Content Paragraph

Template Two News

A template two news contains the following elements:

  • Date
  • Title
  • Subtitle
  • Teaser
  • Content Paragraph
  • Author
  • Author EMail
  • Availability

Template Two Item

A template two item contains the following elements:

  • Name
  • Category
  • Short Description
  • Long Decsription
  • Images
  • Links

Template Two Event

A template two event contains the following elements:

  • Title
  • Teaser
  • Content Paragraph
  • Date
  • Availability

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

A Hello World example

To see the default layout from Template Two, in this chapter a Hello World Jsp is created. Following is to do to create a Hello World output in the standard Template Two layout:

  • 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
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox