SUTRIXMEDIA Sutrix Open CMS Development Guide

User Manual:

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

DownloadSUTRIXMEDIA Sutrix - Open CMS Development Guide
Open PDF In BrowserView PDF
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]

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.
Confidential document
HCMC Office: 72/4 Truong Quoc Dung,
District Phu Nhuan, HCMC, Viet Nam
: +84 8 39975901
: +84 8 3997 5900

Page 1/76
: www.sutrixmedia.com

HK Office: Unit 706, 7/F., South Seas, Towers,
75 Mody Road, TsimShaTsui, Hong Kong
: +852 8197 1217

[TYPE THE DOCUMENT]

1. Signature
Originator By: Binh Mai

Date: 11/02/2014

Prepared By:
Date: ….../…..../……….
Approved By:
Date: ….../…..../……….
Reviewed By:

Distributed To:

Confidential document
HCMC Office: 72/4 Truong Quoc Dung,
District Phu Nhuan, HCMC, Viet Nam
: +84 8 39975901
: +84 8 3997 5900

Page 2/76
: www.sutrixmedia.com

HK Office: Unit 706, 7/F., South Seas, Towers,
75 Mody Road, TsimShaTsui, Hong Kong
: +852 8197 1217

[TYPE THE DOCUMENT]

2. Revision History
*A – Added, M – Modified, D - Deleted
Version

Date

A*, M, D

1.0

11.02.14

A

Change Description
Create document

Author

Approved By

Binh Mai

Confidential document
HCMC Office: 72/4 Truong Quoc Dung,
District Phu Nhuan, HCMC, Viet Nam
: +84 8 39975901
: +84 8 3997 5900

Page 3/76
: www.sutrixmedia.com

HK Office: Unit 706, 7/F., South Seas, Towers,
75 Mody Road, TsimShaTsui, Hong Kong
: +852 8197 1217

[TYPE THE DOCUMENT]

3. Table of Contents
1.

Signature..................................................................................................................... 2

2.

Revision History ........................................................................................................... 3

3.

Table of Contents ...................................................................................................... 4

4.

Overview .................................................................................................................... 7

5.

Module ........................................................................................................................ 8

6.

5.1.

Create Module ................................................................................................................ 8

5.2.

Create JSP file .................................................................................................................. 9

Resource ................................................................................................................... 12
6.1.

7.

8.

Image .............................................................................................................................. 12

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

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
Confidential document

HCMC Office: 72/4 Truong Quoc Dung,
District Phu Nhuan, HCMC, Viet Nam
: +84 8 39975901
: +84 8 3997 5900

Page 4/76
: www.sutrixmedia.com

HK Office: Unit 706, 7/F., South Seas, Towers,
75 Mody Road, TsimShaTsui, Hong Kong
: +852 8197 1217

[TYPE THE DOCUMENT]

8.9.

9.

Nested Structure Content............................................................................................ 32

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
Confidential document
HCMC Office: 72/4 Truong Quoc Dung,
District Phu Nhuan, HCMC, Viet Nam
: +84 8 39975901
: +84 8 3997 5900

Page 5/76
: www.sutrixmedia.com

HK Office: Unit 706, 7/F., South Seas, Towers,
75 Mody Road, TsimShaTsui, Hong Kong
: +852 8197 1217

[TYPE THE DOCUMENT]

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

Confidential document
HCMC Office: 72/4 Truong Quoc Dung,
District Phu Nhuan, HCMC, Viet Nam
: +84 8 39975901
: +84 8 3997 5900

Page 6/76
: www.sutrixmedia.com

HK Office: Unit 706, 7/F., South Seas, Towers,
75 Mody Road, TsimShaTsui, Hong Kong
: +852 8197 1217

[TYPE THE DOCUMENT]

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.

Confidential document
HCMC Office: 72/4 Truong Quoc Dung,
District Phu Nhuan, HCMC, Viet Nam
: +84 8 39975901
: +84 8 3997 5900

Page 7/76
: www.sutrixmedia.com

HK Office: Unit 706, 7/F., South Seas, Towers,
75 Mody Road, TsimShaTsui, Hong Kong
: +852 8197 1217

[TYPE THE DOCUMENT]

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)

Confidential document
HCMC Office: 72/4 Truong Quoc Dung,
District Phu Nhuan, HCMC, Viet Nam
: +84 8 39975901
: +84 8 3997 5900

Page 8/76
: www.sutrixmedia.com

HK Office: Unit 706, 7/F., South Seas, Towers,
75 Mody Road, TsimShaTsui, Hong Kong
: +852 8197 1217

[TYPE THE DOCUMENT]

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
Confidential document
HCMC Office: 72/4 Truong Quoc Dung,
District Phu Nhuan, HCMC, Viet Nam
: +84 8 39975901
: +84 8 3997 5900

Page 9/76
: www.sutrixmedia.com

HK Office: Unit 706, 7/F., South Seas, Towers,
75 Mody Road, TsimShaTsui, Hong Kong
: +852 8197 1217

[TYPE THE DOCUMENT]

“/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:

Confidential document
HCMC Office: 72/4 Truong Quoc Dung,
District Phu Nhuan, HCMC, Viet Nam
: +84 8 39975901
: +84 8 3997 5900

Page 10/76
: www.sutrixmedia.com

HK Office: Unit 706, 7/F., South Seas, Towers,
75 Mody Road, TsimShaTsui, Hong Kong
: +852 8197 1217

[TYPE THE DOCUMENT]

Double click on “myFirstTemplate.jsp” to see result

Confidential document
HCMC Office: 72/4 Truong Quoc Dung,
District Phu Nhuan, HCMC, Viet Nam
: +84 8 39975901
: +84 8 3997 5900

Page 11/76
: www.sutrixmedia.com

HK Office: Unit 706, 7/F., South Seas, Towers,
75 Mody Road, TsimShaTsui, Hong Kong
: +852 8197 1217

[TYPE THE DOCUMENT]

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.

Confidential document
HCMC Office: 72/4 Truong Quoc Dung,
District Phu Nhuan, HCMC, Viet Nam
: +84 8 39975901
: +84 8 3997 5900

Page 12/76
: www.sutrixmedia.com

HK Office: Unit 706, 7/F., South Seas, Towers,
75 Mody Road, TsimShaTsui, Hong Kong
: +852 8197 1217

[TYPE THE DOCUMENT]

In the “myFirstTemplate.jsp”, please replace current content with text below. Then, click
on it and see result in browser.


Wonderful World of Flowers



Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 13/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] 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" %> <cms:info property="opencms.title" />
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 >>” Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 15/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] - Step 03: Enter “page title” and click on button “Advanced” - Step 04: Enter “template (/system/modules/my.first.template/templates/myFirstTemplate.jsp)” and path click on button “Finish” Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 16/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] - 7.3. Preview: Then, check it on your browser 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 Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 17/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] - Step 2: Select tab “Model pages”. Click on “add” icon on the last model page and enter your path as picture below Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 18/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 19/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] 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 Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 20/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] - You can use an example below if needed Color schema Alignment Left Right Salary is incorrect Color schema Alignment Left Right Salary is incorrect Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 22/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] 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”. Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 23/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] - 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" %>

Student Information

Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 24/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT]
Username ${content.value.Username}
Description ${content.value.Description}
Salary ${content.value.Salary}
ContactEmail ${content.value.ContactEmail}
Address ${content.value.Address}
">  
- How to configure formatter? In Schema file (student.xsd), you can see a tag “”. That is where you can configure your JSP file. Example: 8.4. Settings It is the same “dialog_design” in CQ5. You can add more settings into structure content (schema). Example: 8.4.1. Localization - Bundles It’s used to localize labels/values of settings. - Bundle: we can add any message key into schema. Example: Color Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 25/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] schema Alignment Left Right Salary is incorrect Color schema Alignment Left Right Salary is incorrect - Use it in tag : you can use it with pattern %(key.[YOUR MASSAGE KEY]). Example: - View in browser: In your browser  Click on setting icon as below  Select your “Color and Alignment”:  Result: Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 26/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] 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/opencmsmodules.xml - Then, modify your module. In this case, we will modify module my.first.template my.first.template 1.1 template-elements /system/modules/my.first.template/schemas/student.xsd Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 28/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] - 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 Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 29/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] 8.7. Result After you finish item #4, #5, you will see it in browser as below: Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 30/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] 8.8. Display structure content in other places http://arquivo.bng-galiza.org/opencms/opencms/alkacondocumentation/documentation_taglib/docu_tag_contentload.html Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 31/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] 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  Then, we will use it in property type as below  Example Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 32/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] Picture Size length Size large Title on picture Has rollover effect Rollover background Rollover text color Rollover text color ddd 9. Servlets You should go to this page and refer how https://opencms.cse.unsw.edu.au/alkacondocumentation/documentation_webdav/configuration_webdav.html 9.1. to config it Add a new Servlet Beside it don’t forget create the Servlet that you want to use: Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 34/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] 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; Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 35/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] } 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. Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 36/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] 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 Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 37/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] 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. Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 38/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] NOTES: You must restart 9.4. - Tomcat after you add configuration or upload a new class. Test First, we should create a form and add it into any JSP or your template Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 39/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT]
- 10. Check Result in your browser 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” Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 40/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] 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
    Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 41/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT]
    highlight default
  • ${elem.navText}
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: http://localhost:8080 /sites/myjourney/ /shared/ Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 42/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] 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")); %> <%-- Show the first page if it is not in navigation links --%> ?page=1">1 ... ?page=">  ?page=">  Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 43/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] <%-- Show the last page if it is not in navigation links --%> ... ?page="> 12.2. Apply Paging Example code:

">

Notes: we only create a simple paging. We should create a custom paging (selector) with some condition on pages. Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 44/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] 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. Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 45/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] - Select OpenCms Module Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 46/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] - Click on button “Fetch” to load all module from Open CMS - Select a module from list and click button “Next” or “Finish” Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 47/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] 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 …) Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 48/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] 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 After use code above, we have result below: /jc/external/en/global/ Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 49/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] 14.4. Include and Parameter We use code below to include a JSP file and parameter 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, response); CmsJspNavBuilder cmsJspNavBuilder = cmsJspAction.getNavigation(); String path = "/jc/external/en"; List items = cmsJspNavBuilder.getNavigationForFolder(path); request, 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 Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 50/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] - Click on icon “Define property” as below - Enter a custom property “countryAbbr” Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 51/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] 14.7.2. Set a value for property - Right click on a page / folder, then select properties - Select tab “Complete Properties”, then expand “Unused properties” - Scroll to property “countryAbbr”, then enter its value “Germany” Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 52/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] 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 COLLECTORS_LIST = Collections.unmodifiableList(Arrays.asList(COLLECTORS)); /** * @see org.opencms.file.collectors.I_CmsResourceCollector#getCollectorNames() */ public List getCollectorNames() { return COLLECTORS_LIST; } /** * @see org.opencms.file.collectors.I_CmsResourceCollector#getCreateLink(org.opencms.file.CmsObject, * java.lang.String, java.lang.String) */ 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 [TYPE THE DOCUMENT] 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 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 Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 54/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] * 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 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 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. Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 55/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] 14.8.3. Use It in JSP We will use code below in JSP file. 14.8.4. Refers https://github.com/alkacon/alkaconoamp/blob/master/com.alkacon.opencms.newsletter/src/com/alkacon/opencms/news letter/CmsNewsletterResourceCollector.java http://grepcode.com/file/repo1.maven.org/maven2/org.opencms/opencmscore/8.0.3.1/org/opencms/file/collectors/CmsPriorityResourceCollector.java https://opencms.cse.unsw.edu.au/alkacondocumentation/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 Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 56/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT]  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 Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 57/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] - Fetch, select “com.sutrixmedia.company” module and finish Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 58/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] - 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) Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 59/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] 15.3. Create a new structured content - New file “department.xsd” on “Schemas” folder. Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 60/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] - Right Click, copy to OpenCms Server - Opencms the file “\Tomcat 7.0\webapps\opencms\WEB-INF\config\ opencmsmodules.xml”, find to line “com.sutrixmedia.company” and add cofig. Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 61/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] - 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”. Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 62/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] - 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” Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 63/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] - Locale on “workplace.properties” - Restart tomcat, create structured content “Company” and see the result: Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 64/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] 15.5. Create a template - Create new jsp with name “company.jsp” on “templates” folder Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 65/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] - Create new container page “index.html”, - Set template refer to: /system/modules/com.sutrixmedia.company/templates/company.jsp Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 66/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] - Run index.html, drag and drop a structured content successfully, that’s good. Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 67/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] 15.6. Create a formatter - Create “.config” file on and config: /system/modules/com.sutrixmedia.company/.config Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 68/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] o Should see as below: Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 69/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] - Create formatter with name “company.jsp” on “formatter” folder: Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 70/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] - Make sure company.xsd refer to formatter company.jsp right. - Run index.html, drap and drop “company” and see the result: Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 71/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] Index.html Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 72/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] 15.7. Sitemap editor - Click button “open sitemap editor” Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 73/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] - 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-beginnersguide.html Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 74/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217 [TYPE THE DOCUMENT] ++++++++++++++++++++++ BLANK PAGE ++++++++++++++++++++++++++++++++ Confidential document HCMC Office: 72/4 Truong Quoc Dung, District Phu Nhuan, HCMC, Viet Nam : +84 8 39975901 : +84 8 3997 5900 Page 75/76 : www.sutrixmedia.com HK Office: Unit 706, 7/F., South Seas, Towers, 75 Mody Road, TsimShaTsui, Hong Kong : +852 8197 1217

Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.5
Linearized                      : No
Page Count                      : 76
Language                        : en-US
Tagged PDF                      : Yes
Title                           : SUTRIXMEDIA
Author                          : Nguyen Ngoc Nhan
Subject                         : PROCESS
Creator                         : Microsoft® Word 2010
Create Date                     : 2014:02:13 13:15:17+07:00
Modify Date                     : 2014:02:13 13:15:17+07:00
Producer                        : Microsoft® Word 2010
EXIF Metadata provided by EXIF.tools

Navigation menu