SUTRIXMEDIA Sutrix Open CMS Development Guide

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 76

OPENCMS DEVELOPMENT GUIDE
VERSION 8.5.1
This document provides basic items/ steps to understand Open CMS 8.5.1. Trainee should read
document which provided by Alkacon. It will describe details of templates, modules,
structured content, navigation, paging, etc.
Binh Mai
Sutrix Media (Vietnam) JSC.
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 1/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
CONTENT OWNER:
Sutrix Media
All future revisions to this document shall be approved by the content owner prior to release.
The information contained herein is PROPRIETARY to The Sutrixmedia Joint Stock Company
and shall not be reproduced or disclosed in whole or in part or used for any purpose except
when the user possesses direct, written authorization from
The Sutrixmedia Joint Stock Company.
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 2/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
1. Signature
Originator By: Binh Mai
Date: 11/02/2014
Prepared By:
Date: ….../…..../……….
Approved By:
Date: ….../…..../……….
Reviewed By:
Distributed To:
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 3/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
2. Revision History
*A Added, M Modified, D - Deleted
Version
Date
A*, M, D
Change Description
Author
Approved By
1.0
11.02.14
A
Create document
Binh Mai
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 4/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
3. Table of Contents
1. Signature ..................................................................................................................... 2
2. Revision History ........................................................................................................... 3
3. Table of Contents ...................................................................................................... 4
4. Overview .................................................................................................................... 7
5. Module ........................................................................................................................ 8
5.1. Create Module ................................................................................................................ 8
5.2. Create JSP file .................................................................................................................. 9
6. Resource ................................................................................................................... 12
6.1. Image .............................................................................................................................. 12
7. Template Creation .................................................................................................. 14
7.1. Create a simple template ........................................................................................... 14
7.2. Model page ................................................................................................................... 15
7.3. Sitemap configuration ................................................................................................. 17
7.4. Add Header / Footer configuration .......................................................................... 20
7.5. Styling ............................................................................................................................... 20
8. Structure Content .................................................................................................... 20
8.1. Overview ......................................................................................................................... 20
8.2. Schema ........................................................................................................................... 20
8.3. Formatter ........................................................................................................................ 23
8.4. Settings ............................................................................................................................ 25
8.4.1. Localization - Bundles .............................................................................. 25
8.5. Module Configuration .................................................................................................. 27
8.6. Configure file “.config” ................................................................................................ 29
8.7. Result ................................................................................................................................ 30
8.8. Display structure content in other places ................................................................ 31
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 5/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
8.9. Nested Structure Content............................................................................................ 32
9. Servlets ...................................................................................................................... 34
9.1. Add a new Servlet ........................................................................................................ 34
9.2. Upload Classes .............................................................................................................. 37
9.3. Web configuration ........................................................................................................ 38
9.4. Test ................................................................................................................................... 39
10. Localization .............................................................................................................. 40
11. Navigation ................................................................................................................ 41
11.1. Menu ................................................................................................................................ 41
11.2. Site Map .......................................................................................................................... 42
12. Paging ....................................................................................................................... 43
12.1. Add a render (pagination.jsp) ................................................................................... 43
12.2. Apply Paging ................................................................................................................. 44
13. Eclipse Plug-in .......................................................................................................... 45
13.1. Configuration ................................................................................................................. 45
13.2. Import Module from Open CMS to Eclipse .............................................................. 45
13.3. Synchronize Resources ................................................................................................. 48
14. Technique ................................................................................................................. 48
14.1. Available XML field types ............................................................................................ 48
14.2. Widgets ........................................................................................................................... 49
14.3. Get Request Folder ....................................................................................................... 49
14.4. Include and Parameter ............................................................................................... 50
14.5. Get a resource............................................................................................................... 50
14.6. Get a list of resources ................................................................................................... 50
14.7. Custom Property ............................................................................................................ 50
14.7.1. Add a custom property ........................................................................... 50
14.7.2. Set a value for property ........................................................................... 52
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 6/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
14.7.3. Get value ................................................................................................... 53
14.8. Custom Collector .......................................................................................................... 53
14.8.1. Extends A_CmsResourceCollector ........................................................ 53
14.8.2. Configuration ............................................................................................ 55
14.8.3. Use It in JSP ................................................................................................. 56
14.8.4. Refers ........................................................................................................... 56
14.9. Online or Offline ............................................................................................................. 56
15. Open CMS for dummy ............................................................................................ 56
15.1. Create new module ..................................................................................................... 56
15.2. Get module from server to eclipse ............................................................................ 57
15.3. Create a new structured content ............................................................................. 60
15.4. Create a structured content with nested ................................................................ 62
15.5. Create a template ....................................................................................................... 65
15.6. Create a formatter ....................................................................................................... 68
15.7. Sitemap editor ............................................................................................................... 73
16. Reference ................................................................................................................. 74
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 7/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
4. Overview
This document provides basic items/ steps to understand Open CMS 8.5.1. Trainee should
read document which provided by Alkacon. It will describe details of templates,
modules, structured content, navigation, paging, etc.
We also describe steps to synchronize Eclipse with Open CMS.
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 8/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
5. Module
5.1. Create Module
Create a module and give it a proper name (e.g. my.first.template)
In the OpenCms workplace, switch to the Administration view and select “Module
Management”. In the “Module Management”, please click on “New Module”. As
package name enter my.first.template” and as module name “My First Template”. In
the section Module folders check all the checkboxes (important: template JSPs must be
placed in the template folder)
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 9/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
Click OK to create the module with these settings.
5.2. Create JSP file
Switch back to the Explorer view and go to the folder
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 10/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
“/system/modules/my.first.template/templates/” and select “New from the toolbar. In
the
opening dialog select “JSP”.
In the following window name the file “myFirstTemplate.jsp” and if you want to edit the
properties give it a proper title like “My First Template”.
Edit JSP content:
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 11/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
Double click on “myFirstTemplate.jsp” to see result
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 12/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
6. Resource
6.1. Image
In the following dialog enter the folder name “images” and click “Finish”.
After you created the “images” folder click on the “Upload” icon from the toolbar and in
the opening multiple file upload dialog select the header, body and footer parts from
your local system. Click OK.
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 13/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
In the “myFirstTemplate.jsp”, please replace current content with text below. Then, click
on it and see result in browser.
<html>
<head>
<title>Wonderful World of Flowers
</title>
</head>
<body>
<center>
<div>
<img src="/opencms/opencms/system/modules/my.first.template/resources/images/header.jpg">
</div>
<div>
<img src="/opencms/opencms/system/modules/my.first.template/resources/images/body.jpg">
</div>
<div>
<img src="/opencms/opencms/system/modules/my.first.template/resources/images/footer.jpg">
</div>
</center>
</body>
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 14/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
</html>
Preview:
7. Template Creation
7.1. Create a simple template
To make this static HTML file a simple template there is only a few steps:
Open your template file (myFirstTemplate.jsp) and copy & paste the following code
<%@page taglibs="c,cms,fn" %>
<html>
<head>
<title><cms:info property="opencms.title" /></title>
<cms:enable-ade />
</head>
<body>
<div id="header">
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 15/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
<cms:container name="headercontainer" type="header" />
</div>
<div>
<img
src="/opencms/opencms/system/modules/my.first.template/resources/images/body.jpg">
</div>
<div id="footer">
<cms:container name="footercontainer" type="footer" />
</div>
</body>
</html>
7.2. Model page
To test the template, switch to /sites/default/ and create a new model page. To do so,
go to the folder /.content/.new/ and create a new “container page” by clicking the
“New” icon in the toolbar and select “Container page” in the “New” dialog
- Step 01: Select as picture and click on button “Continue >>”
- Step 02: Enter “Name” and click on button “Continue >>”
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 16/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
- Step 03: Enter “page title” and click on button “Advanced”
- Step 04: Enter “template path
(/system/modules/my.first.template/templates/myFirstTemplate.jsp)” and click on
button “Finish”
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 17/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
- Preview: Then, check it on your browser
7.3. Sitemap configuration
Now edit the sitemap configuration by opening the file /.content/.config and go to the
tab “Page models”. Here add a new page model and choose your new model page
from the widget opening when the folder icon is clicked.
- Step 01: Right click on “.config”. Then, select “Edit” on menu
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 18/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
- Step 2: Select tab “Model pages”. Click on “add” icon on the last model page and
enter your path as picture below
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 19/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 20/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
7.4. Add Header / Footer configuration
7.5. Styling
8. Structure Content
8.1. Overview
The structure content is the same component in CQ5. In CQ5, we will define properties /
fields in a XML file; it’s called dialog. In Open CMS, we will define properties/fields in a
XSD, it is called schema. After you finished all steps of item #4, you have to restart your
Tomcat.
8.2. Schema
- First, we will create a XSD file, named “student.xsd” as below
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 21/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
- You can use an example below if needed
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xsd:include schemaLocation="opencms://opencms-xmlcontent.xsd"/>
<!-- <xsd:include
schemaLocation="opencms:/system/modules/my.first.template/schemas/student.xsd" /> -->
<xsd:element name="AlkaconStudentInfos" type="OpenCmsAlkaconStudentInfos"/>
<xsd:complexType name="OpenCmsAlkaconStudentInfos">
<xsd:sequence>
<xsd:element name="AlkaconStudentInfo"
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 22/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
type="OpenCmsAlkaconStudentInfo" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="OpenCmsAlkaconStudentInfo">
<xsd:sequence>
<xsd:element name="Username" type="OpenCmsString" />
<xsd:element name="Description" type="OpenCmsHtml" />
<xsd:element name="Salary" type="OpenCmsString" />
<xsd:element name="ContactEmail" type="OpenCmsString" />
<xsd:element name="Address" type="OpenCmsHtml" />
<xsd:element name="Logo" type="OpenCmsVfsFile" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="language" type="OpenCmsLocale" use="required"/>
</xsd:complexType>
<xsd:annotation>
<xsd:appinfo>
<resourcebundles>
<xmlbundle name="my.first.template.workplace.xml">
<bundle locale="en">
<resource
key="student.setting.boxschema">Color schema</resource>
<resource
key="student.setting.imgalign">Alignment</resource>
<resource
key="student.setting.imgalign.left">Left</resource>
<resource
key="student.setting.imgalign.right">Right</resource>
<resource key="err.notempty">Salary is
incorrect</resource>
</bundle>
<bundle locale="de">
<resource
key="student.setting.boxschema">Color schema</resource>
<resource
key="student.setting.imgalign">Alignment</resource>
<resource
key="student.setting.imgalign.left">Left</resource>
<resource
key="student.setting.imgalign.right">Right</resource>
<resource key="err.notempty">Salary is
incorrect</resource>
</bundle>
</xmlbundle>
</resourcebundles>
<defaults>
<default element="Username"
value="%(currentuser.fullname)" />
</defaults>
<layouts>
<layout element="Description" widget="HtmlWidget"
configuration="source, link, anchor, formatselect, imagegallery" />
<layout element="Logo" widget="ImageGalleryWidget" />
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 23/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
</layouts>
<mappings>
<mapping element="Username" mapto="property:Title" />
</mappings>
<formatters>
<formatter minwidth="200"
uri="/system/modules/my.first.template/formatters/student.jsp" searchcontent="true" />
</formatters>
<settings>
<setting name="boxschema" nice-
name="%(key.student.setting.boxschema)" default="box_schema3" type="string"
widget="select" widget-config="box_schema3:Schema White|box_schema1:Schema
Blue|box_schema2:Schema Red" />
<setting name="imgalign" nice-
name="%(key.student.setting.imgalign)" type="string" widget="select" widget-
config="left:%(key.student.setting.imgalign.left)|right:%(key.student.setting.imgalign.right)" />
</settings>
<validationrules>
<rule element="Salary" regex=".+" type="error"
message="%(key.err.notempty) %(validation.path)" />
</validationrules>
</xsd:appinfo>
</xsd:annotation>
</xsd:schema>
8.3. Formatter
To display contain of structure content, we have to add a formatter to generate it.
- First, create a JSP from workplace, named “student.jsp”.
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 24/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
- Then, you write content of JSP to generate data. You can use example below if
needed
<%@ page session="false" %>
<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<cms:formatter var="content" val="value">
<div class="box ${cms.element.settings.boxschema}" style="padding: 20px;">
<h1>Student Information</h1>
<table cellspacing="1" cellpadding="5" border="0" bgcolor="#777" width="550"
style="border: 0px!important;">
<tr bgcolor="#fff" style="height: 22px;">
<td width="120">Username</td>
<td>${content.value.Username}</td>
</tr>
<tr bgcolor="#efefef" style="height: 22px;">
<td>Description</td>
<td>${content.value.Description}</td>
</tr>
<tr bgcolor="#fff" style="height: 22px;">
<td>Salary</td>
<td>${content.value.Salary}</td>
</tr>
<tr bgcolor="#efefef" style="height: 22px;">
<td>ContactEmail</td>
<td>${content.value.ContactEmail}</td>
</tr>
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 25/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
<tr bgcolor="#fff" style="height: 22px;">
<td>Address</td>
<td>${content.value.Address}</td>
</tr>
<tr bgcolor="#fff" style="height: 22px;">
<td colspan="2" align="<cms:elementsetting name="imgalign"
default="left" />">
<c:if test="${not empty content.value.Logo}">
<img src="<cms:link>${content.value.Logo}</cms:link>"
style="width:200px;height:200px;" />
</c:if>&nbsp;
</td>
</tr>
</table>
</div>
</cms:formatter>
- How to configure formatter?
In Schema file (student.xsd), you can see a tag <formatters></formatters>. That is
where you can configure your JSP file. Example:
<formatters>
<formatter minwidth="200"
uri="/system/modules/my.first.template/formatters/student.jsp" searchcontent="true" />
</formatters>
8.4. Settings
It is the same “dialog_design” in CQ5. You can add more settings into structure content
(schema). Example:
<settings>
<setting name="boxschema" nice-name="%(key.student.setting.boxschema)"
default="box_schema3" type="string" widget="select" widget-config="box_schema3:Schema
White|box_schema1:Schema Blue|box_schema2:Schema Red" />
<setting name="imgalign" nice-name="%(key.student.setting.imgalign)" type="string"
widget="select" widget-
config="left:%(key.student.setting.imgalign.left)|right:%(key.student.setting.imgalign.right)" />
</settings>
8.4.1. Localization - Bundles
It’s used to localize labels/values of settings.
- Bundle: we can add any message key into schema.
Example:
<resourcebundles>
<xmlbundle name="my.first.template.workplace.xml">
<bundle locale="en">
<resource key="student.setting.boxschema">Color
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 26/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
schema</resource>
<resource key="student.setting.imgalign">Alignment</resource>
<resource key="student.setting.imgalign.left">Left</resource>
<resource key="student.setting.imgalign.right">Right</resource>
<resource key="err.notempty">Salary is incorrect</resource>
</bundle>
<bundle locale="de">
<resource key="student.setting.boxschema">Color
schema</resource>
<resource key="student.setting.imgalign">Alignment</resource>
<resource key="student.setting.imgalign.left">Left</resource>
<resource key="student.setting.imgalign.right">Right</resource>
<resource key="err.notempty">Salary is incorrect</resource>
</bundle>
</xmlbundle>
</resourcebundles>
- Use it in tag <settings>: you can use it with pattern %(key.[YOUR MASSAGE KEY]).
Example:
<setting name="boxschema" nice-name="%(key.student.setting.boxschema)"
default="box_schema3" type="string" widget="select" widget-
config="box_schema3:Schema White|box_schema1:Schema Blue|box_schema2:Schema
Red" />
- View in browser: In your browser
Click on setting icon as below
Select your “Color and Alignment”:
Result:
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 27/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
8.5. Module Configuration
After you created schema, formatter completely, you have to configure it in Open
CMS to enable that schema.
- First, open file {TOMCAT_HOME}/webapps/opencms/WEB-INF/config/opencms-
modules.xml
- Then, modify your module. In this case, we will modify module my.first.template
<module>
<name>my.first.template</name>
<nicename><![CDATA[My First Template]]></nicename>
<class/>
<description><![CDATA[My First Template Description]]></description>
<version>1.1</version>
<authorname><![CDATA[Admin]]></authorname>
<authoremail><![CDATA[donghuong@gmail.com]]></authoremail>
<datecreated/>
<userinstalled/>
<dateinstalled/>
<dependencies/>
<exportpoints>
<exportpoint uri="/system/modules/my.first.template/classes/"
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 28/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
destination="WEB-INF/classes/"/>
</exportpoints>
<resources>
<resource uri="/system/modules/my.first.template/"/>
</resources>
<parameters/>
<resourcetypes>
<type class="org.opencms.file.types.CmsResourceTypeXmlContent"
name="student" id="1901">
<properties>
<property>
<name>template-elements</name>
<value><![CDATA[/system/modules/my.first.template/formatters/student.jsp]]></v
alue>
</property>
</properties>
<param
name="schema">/system/modules/my.first.template/schemas/student.xsd</param>
</type>
</resourcetypes>
<explorertypes>
<explorertype name="sutrixmedia" key="fileicon.sutrixmedia"
icon="aculaicon.png" reference="xmlcontent">
<newresource uri="newresource.jsp?page=sutrixmedia" order="11"
autosetnavigation="false" autosettitle="false" info="desc.sutrixmedia"/>
<accesscontrol>
<accessentry principal="ROLE.WORKPLACE_USER"
permissions="+r+v+w+c"/>
</accesscontrol>
</explorertype>
<explorertype name="student" key="fileicon.student" icon="xmlcontent.gif"
reference="xmlcontent">
<newresource page="sutrixmedia"
uri="newresource_xmlcontent.jsp?newresourcetype=student" order="70"
autosetnavigation="false" autosettitle="false" info="desc.student"/>
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 29/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
<accesscontrol>
<accessentry principal="ROLE.WORKPLACE_USER"
permissions="+r+v+w+c"/>
</accesscontrol>
</explorertype>
</explorertypes>
</module>
- Description:
Page=”sutrixmedia”: It’s a group of structure content. If you don’t want to
create another group, you can use “structurecontent”, or any group you
have.
Page=”student”: It’s a new structure content. This name will be use in file
“.config” in your module. We will see it in next section
8.6. Configure file “.config”
If your module doesn’t have file .config”, you can copy it from another module to your
module
- Right click on file “.config”
- Select “Edit” in menu
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 30/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
8.7. Result
After you finish item #4, #5, you will see it in browser as below:
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 31/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
8.8. Display structure content in other places
http://arquivo.bng-galiza.org/opencms/opencms/alkacon-
documentation/documentation_taglib/docu_tag_contentload.html
<cms:contentload collector="allInFolder"
param="/.content/demo_new_component/demo_new_component_%(number).html|d
emo_new_component|5"><cms:contentshow
element="Username"/></cms:contentload>
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 32/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
8.9. Nested Structure Content
It allows us to use / include structure content into existing structure content.
First, we have to include structure content as below
<xsd:include
schemaLocation="opencms://system/modules/com.carlsonwagonlit.jobandcareers/sche
mas/jc-standard-picture.xsd" />
Then, we will use it in property type as below
<xsd:element name="mediaContent" type="OpenCmsAlkaconJcStandardPictureInfo"
minOccurs="1" maxOccurs="unbounded" />
Example
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xsd:include schemaLocation="opencms://opencms-xmlcontent.xsd"/>
<xsd:element name="AlkaconJcStandardPictureInfos"
type="OpenCmsAlkaconJcStandardPictureInfos"/>
<xsd:complexType name="OpenCmsAlkaconJcStandardPictureInfos">
<xsd:sequence>
<xsd:element name="AlkaconJcStandardPictureInfo"
type="OpenCmsAlkaconJcStandardPictureInfo" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="OpenCmsAlkaconJcStandardPictureInfo">
<xsd:sequence>
<xsd:element name="Picture" type="OpenCmsVfsImage" />
<xsd:element name="Size_length" type="OpenCmsString" />
<xsd:element name="Size_large" type="OpenCmsString" />
<xsd:element name="Title_on_picture" type="OpenCmsHtml" />
<xsd:element name="Text_on_picture" type="OpenCmsHtml" />
<xsd:element name="Clickable" type="OpenCmsBoolean" />
<xsd:element name="Link" type="OpenCmsString" />
<xsd:element name="Target_link" type="OpenCmsString" />
</xsd:sequence>
<xsd:attribute name="language" type="OpenCmsLocale" use="optional"/>
</xsd:complexType>
<xsd:annotation>
<xsd:appinfo>
<resourcebundles>
<xmlbundle name="com.carlsonwagonlit.jobandcareers.workplace.xml">
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 33/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
<bundle locale="en">
<resource
key="label.AlkaconJcStandardPictureInfo.Picture">Picture</resource>
<resource
key="label.AlkaconJcStandardPictureInfo.Size_length">Size length</resource>
<resource
key="label.AlkaconJcStandardPictureInfo.Size_large">Size large</resource>
<resource
key="label.AlkaconJcStandardPictureInfo.Title_on_picture">Title on picture</resource>
<resource
key="label.AlkaconJcStandardPictureInfo.Text_on_picture">Has rollover effect</resource>
<resource
key="label.AlkaconJcStandardPictureInfo.Clickable">Rollover background</resource>
<resource
key="label.AlkaconJcStandardPictureInfo.Link">Rollover text color</resource>
<resource
key="label.AlkaconJcStandardPictureInfo.Target_link">Rollover text color</resource>
</bundle>
</xmlbundle>
</resourcebundles>
<defaults>
<default element="Clickable" value="false" />
</defaults>
<layouts>
<layout element="Picture" widget="ImageGalleryWidget" />
<layout element="Title_on_picture" widget="HtmlWidget"
configuration="source, link, anchor, formatselect, imagegallery" />
<layout element="Text_on_picture" widget="HtmlWidget"
configuration="source, link, anchor, formatselect, imagegallery" />
</layouts>
<mappings>
<!-- <mapping element="ContactEmail" mapto="property:Title" /> -->
</mappings>
<formatters>
<formatter minwidth="200"
uri="/system/modules/com.carlsonwagonlit.jobandcareers/formatters/jc-standard-picture.jsp"
searchcontent="false" />
</formatters>
<validationrules>
<rule element="Picture" regex="!^\s*$" type="error"
message="${key.editor.error.jcstandardpicture.Picture}" />
</validationrules>
</xsd:appinfo>
</xsd:annotation>
</xsd:schema>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xsd:include schemaLocation="opencms://opencms-xmlcontent.xsd" />
<xsd:include
schemaLocation="opencms://system/modules/com.carlsonwagonlit.jobandcareers/schemas/jc-
standard-picture.xsd" />
<xsd:element name="AlkaconJcStandardMediaInfos"
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 34/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
type="OpenCmsAlkaconJcStandardMediaInfos"/>
<xsd:complexType name="OpenCmsAlkaconJcStandardMediaInfos">
<xsd:sequence>
<xsd:element name="AlkaconJcStandardMediaInfo"
type="OpenCmsAlkaconJcStandardMediaInfo" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="OpenCmsAlkaconJcStandardMediaInfo">
<xsd:sequence>
<xsd:element name="Type" type="OpenCmsString" minOccurs="1"
maxOccurs="1" />
<xsd:element name="mediaContent"
type="OpenCmsAlkaconJcStandardPictureInfo" minOccurs="1" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="language" type="OpenCmsLocale" use="optional"/>
</xsd:complexType>
<xsd:annotation>
<xsd:appinfo>
<defaults>
<default element="Type" value="Visual" />
</defaults>
<layouts>
<layout element="Type" widget="ComboWidget"
configuration="value='Visual'|value='Banner'|value='Video' default='Visual'" />
</layouts>
<formatters>
<formatter minwidth="200"
uri="/system/modules/com.carlsonwagonlit.jobandcareers/formatters/jc-standard-media.jsp"
searchcontent="false" />
</formatters>
</xsd:appinfo>
</xsd:annotation>
</xsd:schema>
ddd
9. Servlets
You should go to this page and refer how to config it
https://opencms.cse.unsw.edu.au/alkacon-
documentation/documentation_webdav/configuration_webdav.html
9.1. Add a new Servlet
Beside it don’t forget create the Servlet that you want to use:
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 35/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
package com.alkacon.opencms.sutrixmedia.ungtq.training.newcomponent;
import org.opencms.main.OpenCmsServlet;
public class TestServletTraining extends OpenCmsServlet {
private static final long serialVersionUID = 8986659371531056838L;
private String text;
public TestServletTraining() {
}
public String getText() {
return text;
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 36/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
}
public void setText(String text) {
this.text = text;
}
public String appendStr(javax.servlet.http.HttpServletRequest req) {
String sText =
req.getAttribute("text")==null?"":req.getAttribute("text").toString();
setText(sText);
return "hello " + text;
}
public void doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res) throws java.io.IOException,
javax.servlet.ServletException {
res.getWriter().write("This is my first servlet!");
}
public void doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res) throws java.io.IOException,
javax.servlet.ServletException {
doGet(req, res);
}
}
Your servlet have to extends from OpenCmsServlet base on the recommend by
Alkacon And then it, you should look for the .class file servlet and upload on openCMS. In my
case, the servlet that I created automatically build with Eclipse.
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 37/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
9.2. Upload Classes
And then you should go the modules on openCMS and upload it. The question I’m sure
you confuse that where the modules that we upload it, I’m really not sure about it
because I see I could upload my servlet into any module and it still run.
You must publish this class to generate new class servlet in Tomcat web server
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 38/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
9.3. Web configuration
A default configuration of openCMS servlet is already entered in the web.xml
configuration provided by the OpenCms web application. You must go to the apache
webserver path and look for web.xml file and config it.
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 39/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
NOTES: You must restart Tomcat after you add configuration or upload a new class.
9.4. Test
- First, we should create a form and add it into any JSP or your template
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 40/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
<form action="/opencms/testServletTraining" method="post">
<input type="text" name="text" id="text"/>
<input type="submit" value="Submit Servlet"/>
</form>
- Check Result in your browser
10. Localization
You can localize labels of your application by adding a property file in your module. After
you finish, you have to restart your Tomcat.
- First, create a workplace.properties in your module, named “workplace.properties”
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 41/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
- Then, you can define all properties you want. You can use content below if needed
fileicon.sutrixmedia=Sutrix Media Group
desc.sutrixmedia=Resource types for the Sutrix Media Group
fileicon.student=Student Information
desc.student=Resource types for the Student Information
# Student information
label.AlkaconStudentInfo.Username=User name
label.AlkaconStudentInfo.ContactEmail=Contact Email
11. Navigation
11.1. Menu
To Create Menu in OpenCMS 8.5.1 we simply add somce code to jsp page
<cms:navigation type="forSite" startLevel="1" endLevel="5" var="nav"/>
<ul>
<c:set var="oldLevel" value="" />
<c:forEach items="${nav.items}" var="elem">
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 42/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
<c:set var="currentLevel" value="${elem.navTreeLevel}" />
<c:choose>
<c:when test="${empty oldLevel}"></c:when>
<c:when test="${currentLevel > oldLevel}"><ul></c:when>
<c:when test="${currentLevel == oldLevel}"></li></c:when>
<c:when test="${oldLevel > currentLevel}">
<c:forEach begin="${currentLevel+1}" end="${oldLevel}">
</li></ul>
</c:forEach>
</li>
</c:when>
</c:choose>
<c:choose>
<c:when test="${fn:startsWith(cms.requestContext.uri, elem.resourceName)}">
<c:set var="class1">highlight</c:set>
</c:when>
<c:otherwise><c:set var="class1">default</c:set></c:otherwise>
</c:choose>
<li><a href="<cms:link>${elem.resourceName}</cms:link>"
class="${class1}">${elem.navText}</a>
<c:set var="oldLevel" value="${currentLevel}" />
</c:forEach>
</ul>
To simply the above code I remove code css.It’s depend on your template
Result:
11.2. Site Map
We will code in the menu section to generate site map. It’s related to your CSS only.
Note: We need to configure your site to get correct site map.
Configure in opencms-system.xml:
<sites>
<workplace-server>http://localhost:8080</workplace-server>
<!--default-uri>/sites/default/</default-uri-->
<default-uri>/sites/myjourney/</default-uri>
<shared-folder>/shared/</shared-folder>
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 43/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
<!--site server="http://localhost:8080" uri="/sites/default/"/-->
<site server="http://localhost:8080" uri="/sites/myjourney/"/>
</sites>
We configure to myjourney to make menu just show all page in myjourney folder
12. Paging
12.1. Add a render (pagination.jsp)
We have all the necessary to create the navigation links, so let’s write our pagination.jsp.
<%
//Store the info in the page Context
pageContext.setAttribute("info", request.getAttribute("info"));
%>
<c:if test="${info.resultSize > info.pageSize}">
<%-- Show the first page if it is not in navigation links --%>
<c:if test="${info.pageNavStartIndex > 1}">
<a class="pagelink" href="<cms:link><cms:info property="opencms.request.uri"
/></cms:link>?page=1">1</a><span class="pagdots">&nbsp;...</span>
</c:if>
<c:forEach var="i" begin="${info.pageNavStartIndex}" end="${info.pageNavEndIndex}">
<c:choose>
<c:when test="${(i == info.pageIndex) || (i == 1 && info.pageIndex ==
null)}">
<a class="currentpagelink" href="<cms:link><cms:info
property="opencms.request.uri" /></cms:link>?page=<c:out value="${i}" />"><c:out
value="${i}"/></a>&nbsp;
</c:when>
<c:otherwise>
<a class="pagelink" href="<cms:link><cms:info
property="opencms.request.uri" /></cms:link>?page=<c:out value="${i}" />"><c:out
value="${i}"/></a>&nbsp;
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 44/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
</c:otherwise>
</c:choose>
</c:forEach>
<%-- Show the last page if it is not in navigation links --%>
<c:if test="${info.pageNavEndIndex < info.pageCount}">
<span class="pagdots">...&nbsp;</span><a class="pagelink"
href="<cms:link><cms:info property="opencms.request.uri" /></cms:link>?page=<c:out
value="${info.pageCount}" />"><c:out value="${info.pageCount}" /></a>
</c:if>
</c:if>
12.2. Apply Paging
Example code:
<cms:contentload collector="allInFolder" param="/jc/external/en/global/news-
releases/|jcstandardcontent" pageSize="8" pageIndex="${pagina}" pageNavLength="5">
<cms:contentinfo var="info" scope="request" />
<h3>
<a href="<cms:link><cms:contentshow element="%(opencms.filename)" /></cms:link>">
<cms:contentshow element="title" />
</a>
</h3>
<div class="excerpt">
<cms:contentshow element="excerpt" />
</div>
</cms:contentload>
<div id="pagination">
<cms:include page="pagination.jsp" />
</div>
Notes: we only create a simple paging. We should create a custom paging (selector)
with some condition on pages.
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 45/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
13. Eclipse Plug-in
We will use plug-in “info.rsdev.eclipse.opencms.module.developer_0.0.9.jar” to
synchronize Open CMS with Eclipse.
13.1. Configuration
- First, copy “info.rsdev.eclipse.opencms.module.developer_0.0.9.jar” into your
eclipse/plug-in folder.
- Restart Eclipse
- Set up Open CMS in Eclipse: Window -> Reference
13.2. Import Module from Open CMS to Eclipse
- First, we should import a module from Open CMS to workspace: From menu, select
New -> Others.
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 46/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
- Select OpenCms Module
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 47/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
- Click on button “Fetch” to load all module from Open CMS
- Select a module from list and click button “Next” or “Finish
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 48/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
13.3. Synchronize Resources
14. Technique
14.1. Available XML field types
OpenCmsBoolean Represents a Boolean value (TRUE/FALSE)
OpenCmsCategory Can handle one or more selected categories
OpenCmsColor Stores a hexadecimal color value
OpenCmsDateTime Handles a date value
OpenCmsHtml Used for rich text editor fields (keeps internal relations e.g. text links
intact)
OpenCmsLocale Stores a locale value
OpenCmsPlainTextString Stores the extracted text for a field containing HTML
OpenCmsString Stores a simple String 1:1
OpenCmsVarLink Can handle internal and external at once
OpenCmsVfsFile Designated for storing internal file references
OpenCmsVfsImage Refers internal images (handles image format, scaling, description
…)
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 49/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
14.2. Widgets
widget="DisplayWidget"
widget="SelectorWidget"
widget="TextareaWidget"
widget="RadioSelectWidget"
configuration="Radiobutton1*|Radiobutton2|Radiobutton3|
Radiobutton4|Radiobutton5|Radiobutton6"
widget="MultiSelectWidget" configuration="1*|2*|3*|4|5|6|7"
widget="ComboWidget" configuration="1|2|3|4|5|6|7"
widget="TypeComboWidget"
widget="HtmlWidget"
configuration=" link,anchor,imagegallery,downloadgallery,formatselect"
widget="LocalizationWidget"
configuration="org.opencms.workplace.messages|key=mykey|locale=en"
widget="CategoryWidget"
configuration="category=onlyleafs=false|parentSelection"
widget="GroupWidget"
widget="GroupMultiSelectorWidget"
widget="VfsFileWidget"
configuration="startsite=/sites/www.domain.org/repository|hidesiteselector"
widget="VfsImageWidget" configuration="
{useformat:true,usedescription:true,formatnames:'left:Left|right:Right|top:Top',
['150x?','250x300','?x250']}"
widget="ImageGalleryWidget"
configuration="{type: 'gallery', startup: '/demo_en/images/'}"
widget="LegacyDownloadGalleryWidget"
configuration="{type: 'gallery', startup: '/demo_en/images/'}"
widget="HtmlGalleryWidget"
configuration="{type: 'gallery', startup: '/demo_en/html/'}"
widget="TableGalleryWidget"
configuration="{type: 'gallery', startup: '/demo_en/table/'}"
widget="LinkGalleryWidget"
configuration="{type: 'gallery',
startup: '/demo_en/link/'}"
14.3. Get Request Folder
We can get the current requested folder (example:
http://localhost:8080/opencms/opencms/jc/external/en/global/index.html) as below
<cms:info property="opencms.request.folder" />
After use code above, we have result below:
/jc/external/en/global/
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 50/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
14.4. Include and Parameter
We use code below to include a JSP file and parameter
<cms:include file
="%(link.weak:/system/modules/com.carlsonwagonlit.jobandcareers/templates/aaa.jsp)">
<cms:param name="currency" value="aaa_${iii}" />
</cms:include>
How to use?
<%
String exchange = request.getParameter("currency");
%>
<%=exchange %>
14.5. Get a resource
CmsJspActionElement cmsJspAction = new CmsJspActionElement(pageContext, request,
response);
String path = "/jc/external/en";
CmsJspNavElement navElm = cmsJspAction.getNavigation().getNavigationForResource(path);
14.6. Get a list of resources
CmsJspActionElement cmsJspAction = new CmsJspActionElement(pageContext, request,
response);
CmsJspNavBuilder cmsJspNavBuilder = cmsJspAction.getNavigation();
String path = "/jc/external/en";
List<CmsJspNavElement> items = cmsJspNavBuilder.getNavigationForFolder(path);
14.7. Custom Property
14.7.1. Add a custom property
We can add and set value for any custom property on a folder / page in Open CMS with
steps below (In this case, we will create a property “countryAbbr”)
- Right click on a folder / page, then select properties
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 51/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
- Click on icon “Define property” as below
- Enter a custom property “countryAbbr
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 52/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
14.7.2. Set a value for property
- Right click on a page / folder, then select properties
- Select tabComplete Properties”, then expand “Unused properties
- Scroll to property “countryAbbr”, then enter its value “Germany
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 53/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
14.7.3. Get value
CmsJspActionElement cmsJspAction = new CmsJspActionElement(pageContext, request,
response);
String path = "/jc/external/en/countries/de";
CmsJspNavElement navElm = cmsJspAction.getNavigation().getNavigationForResource(path);
String navElm = navElm.getProperty("countryAbbr");
14.8. Custom Collector
14.8.1. Extends A_CmsResourceCollector
A_CmsResourceCollector is an abstract class. So we will have to implement all abstract
methods as getCollectorNames, getCreateLink, getCreateParam, getResults
Example code:
package com.carlsonwagonlit.jobandcareers.collector;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.apache.commons.logging.Log;
import org.opencms.file.CmsDataAccessException;
import org.opencms.file.CmsObject;
import org.opencms.file.CmsResource;
import org.opencms.file.CmsResourceFilter;
import org.opencms.file.collectors.A_CmsResourceCollector;
import org.opencms.file.collectors.CmsCollectorData;
import org.opencms.file.collectors.CmsExtendedCollectorData;
import org.opencms.file.collectors.Messages;
import org.opencms.main.CmsException;
import org.opencms.main.CmsLog;
public class NewsResourceCollector extends A_CmsResourceCollector {
private static final Log logger = CmsLog.getLog(NewsResourceCollector.class);
/** Static array of the collectors implemented by this class. */
private static final String[] COLLECTORS = { "allNewsInHomePage" };
/** Array list for fast collector name lookup. */
private static final List<String> COLLECTORS_LIST = Collections.unmodifiableList(Arrays.asList(COLLECTORS));
/**
* @see org.opencms.file.collectors.I_CmsResourceCollector#getCollectorNames()
*/
public List<String> getCollectorNames() {
return COLLECTORS_LIST;
}
/**
* @see org.opencms.file.collectors.I_CmsResourceCollector#getCreateLink(org.opencms.file.CmsObject,
* java.lang.String, java.lang.String)
*/
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 54/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
public String getCreateLink(CmsObject cms, String collectorName,
String param) throws CmsDataAccessException, CmsException {
logger.debug("getCreateLink collectorName: " + collectorName + ", param: " + param);
// if action is not set, use default action
collectorName = null;
if (collectorName == null) {
collectorName = COLLECTORS[0];
}
return getCreateInFolder(cms, new CmsExtendedCollectorData(param));
}
/**
* @see
org.opencms.file.collectors.I_CmsResourceCollector#getCreateParam(org.opencms.file.CmsObject,
* java.lang.String, java.lang.String)
*/
public String getCreateParam(CmsObject cms, String collectorName,
String param) throws CmsDataAccessException {
logger.debug("getCreateParam collectorName: " + collectorName + ", param: " + param);
// if action is not set, use default action
collectorName = null;
if (collectorName == null) {
collectorName = COLLECTORS[0];
}
return param;
}
/**
* @see org.opencms.file.collectors.I_CmsResourceCollector#getResults(org.opencms.file.CmsObject,
* java.lang.String, java.lang.String)
*/
public List<CmsResource> getResults(CmsObject cms, String collectorName,
String param) throws CmsDataAccessException, CmsException {
logger.debug("getResults collectorName: " + collectorName + ", param: " + param);
// if action is not set, use default action
collectorName = null;
if (collectorName == null) {
collectorName = COLLECTORS[0];
}
switch (COLLECTORS_LIST.indexOf(collectorName)) {
case 0:
// "allNewsInHomePage"
return getNewsInHomePage(cms, param);
case 1:
//return allNewsInHomePage(cms, param);
default:
throw new
CmsDataAccessException(Messages.get().container(Messages.ERR_COLLECTOR_NAME_INVALID_1,
collectorName));
}
}
/**
* Returns a List of all resources in the folder pointed to by the parameter
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 55/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
* sorted by the selected dates
*
* @param cms
* the current {@link CmsObject}
* @param param
* must contain an extended collector parameter set as described
* by {@link CmsExtendedCollectorData}
* @return a List of all resources in the folder pointed to by the parameter
* sorted by the selected dates
* @throws CmsException
*/
protected List<CmsResource> getNewsInHomePage(CmsObject cms, String param) throws CmsException
{
CmsCollectorData data = new CmsCollectorData(param);
String foldername = CmsResource.getFolderPath(data.getFileName());
CmsResourceFilter filter =
CmsResourceFilter.DEFAULT.addRequireType(data.getType()).addExcludeFlags(CmsResource.FLAG_TEMPFILE);
List<CmsResource> result = cms.readResourcesWithProperty(foldername,
"news.display.in.home.page", "%1", filter);
return shrinkToFit(result, data.getCount());
}
}
14.8.2. Configuration
After we have a custom collector, we have to add it into opencms-vfs.xml
({TOMCAT_HOME}/webapps/opencms/WEB-INF/config/opencms-vfs.xml) to make sure
Open CMS can understand it.
<collectors>
<collector
class="org.opencms.file.collectors.CmsPriorityResourceCollector"
order="100" />
<collector class="org.opencms.file.collectors.CmsDefaultResourceCollector"
order="110" />
<collector class="org.opencms.file.collectors.CmsDateResourceCollector"
order="120" />
<collector
class="org.opencms.file.collectors.CmsTimeFrameCategoryCollector"
order="130" />
<collector
class="org.opencms.file.collectors.CmsCategoryResourceCollector"
order="140" />
<collector class="org.opencms.file.collectors.CmsSubscriptionCollector"
order="150" />
<collector class="org.opencms.file.collectors.CmsChangedResourceCollector"
order="160" />
<collector class="org.opencms.file.collectors.CmsSolrCollector"
order="170" />
<collector class="com.carlsonwagonlit.jobandcareers.collector.NewsResourceCollector"
order="180" />
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 56/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
</collectors>
14.8.3. Use It in JSP
We will use code below in JSP file.
<cms:contentload collector="allNewsInHomePage" param="/jc/external/en/global/news-and-
media/key-points/|jcstandardcontent" pageSize="5" pageIndex="1" pageNavLength="5">
<cms:contentshow element="Title" />
</cms:contentload>
14.8.4. Refers
https://github.com/alkacon/alkacon-
oamp/blob/master/com.alkacon.opencms.newsletter/src/com/alkacon/opencms/news
letter/CmsNewsletterResourceCollector.java
http://grepcode.com/file/repo1.maven.org/maven2/org.opencms/opencms-
core/8.0.3.1/org/opencms/file/collectors/CmsPriorityResourceCollector.java
https://opencms.cse.unsw.edu.au/alkacon-
documentation/documentation_taglib/docu_tag_contentload.html
14.9. Online or Offline
We can use code below to get Open CMS mode
CmsJspActionElement cmsJspAction = new CmsJspActionElement(pageContext, request,
response);
CmsObject cmsObj = cmsJspAction.getCmsObject();
Boolean isOnlineProject, cmsJspAction.getRequestContext().getCurrentProject().isOnlineProject();
15. Open CMS for dummy
15.1. Create new module
Go to “Module Management” > “New Module”, enter package name and check
create module folders
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 57/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
After that, you can see the module created as below
15.2. Get module from server to eclipse
Install eclipse plug-in as 11
- Select “OpenCms Module” and next
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 58/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
- Fetch, select “com.sutrixmedia.company” module and finish
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 59/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
- You can see on eclipse the result:
- Now, If have any change on eclipse, you just right click and select “copy to
OpenCms server” (“Copy to OpenCms server and publish” if want)
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 60/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
15.3. Create a new structured content
- New file “department.xsd” on “Schemas” folder.
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 61/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
- Right Click, copy to OpenCms Server
- Opencms the file \Tomcat 7.0\webapps\opencms\WEB-INF\config\ opencms-
modules.xml”, find to line “com.sutrixmedia.company” and add cofig.
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 62/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
- Restart tomcat, go to “New” > “Structured contents” and see the result:
- You must to locale it as below:
o Created new file with name “workplace.properties” at path:
/com.sutrixmedia.company/classes/com/sutrixmedia/company/workplace.p
roperties
o And set:
o Restart tomcat and see the result:
- Create new file with structured content “company department”, edit, save are okie.
That’s good.
15.4. Create a structured content with nested
- Example, the company has many departments. And you will create a structured
content “Company” contain “Department”.
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 63/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
- Create new file “company.xsd” on “Schemas” folder: (as 13.3 Create a new
structured content)
o Xsd:include chemasLocation=”refer to the xsd file was nested”
o Type = “OpenCmsxxx”, with xxx = name structured content nested.
- Insert code into the “opencms-modules.xml”
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 64/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
- Locale on “workplace.properties”
- Restart tomcat, create structured content “Company” and see the result:
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 65/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
15.5. Create a template
- Create new jsp with name “company.jsp” on “templates” folder
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 66/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
- Create new container page “index.html”,
- Set template refer to:
/system/modules/com.sutrixmedia.company/templates/company.jsp
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 67/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
- Run index.html, drag and drop a structured content successfully, that’s good.
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 68/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
15.6. Create a formatter
- Create “.config” file on and config:
/system/modules/com.sutrixmedia.company/.config
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 69/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
o Should see as below:
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 70/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
- Create formatter with name “company.jsp” on “formatter” folder:
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 71/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
- Make sure company.xsd refer to formatter company.jsp right.
- Run index.html, drap and drop “company” and see the result:
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 72/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
Index.html
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 73/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
15.7. Sitemap editor
- Click button “open sitemap editor”
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 74/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
- And see the result:
- With function list on menu, you can control your site on sitemap.
16. Reference
http://www.opencms.org/en/modules/downloads/dl-template-creation-beginners-
guide.html
[TYPE THE DOCUMENT]
Confidential document
HCMC Office: 72/4 Truong Quoc Dung, Page 75/76 HK Office: Unit 706, 7/F., South Seas, Towers,
District Phu Nhuan, HCMC, Viet Nam 75 Mody Road, TsimShaTsui, Hong Kong
: +84 8 39975901 : +84 8 3997 5900 : +852 8197 1217
: www.sutrixmedia.com
++++++++++++++++++++++ BLANK PAGE ++++++++++++++++++++++++++++++++

Navigation menu