...
- Open both the
page.jsp
andcontent.jsp
with an IDE such as Eclipse.
Additional instructions about XperienCentral WCBs plugins and Eclipse can be found in Quick Start Using Eclipse ***. From the
page.jsp
file, copy the first lines that include the taglibs:Code Block theme Eclipse <%@ page language="java" session="false" buffer="none" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> <%@ taglib uri="http://www.gx.nl/taglib/wm" prefix="wm" %> <%@ taglib uri="http://www.gx.nl/taglib/functions" prefix="wmfn" %>
- Paste the copied JSP code in the
content.jsp
file above the first line in the original HTML code Create a new
mydesign.xml
file and place it in the same folder asmydesign.jsp
. This XML-descriptor (explained in detail in Example Design Layout) should contain the following:Code Block theme Eclipse <design template> <name>helloworldDesign template mydesign</name> <display-name>HWP MyDesign</display-name> <scope>Page</scope> </design template>
- Adjust the name and display name in the XML descriptor file. The name-value will be used by XperienCentral to identify the design template, and should be unique. The value of the
name
attribute in the descriptor of a JSP should also be prefixed by the plugin ID as required by the development guideline G139. The display name will be visible for editors when selecting the page design template for a page. - Now it is time for the deployment of the design template plugin to XperienCentral. In a Command prompt, run the following command in the helloworldDesign template folder:
mvn clean package -s C:\GX\XperienCentral\settings.xml
- This command will create a target folder that contains the plugin:
helloworldDesign template-1.0.0.jar
. - You can either upload this plugin using the Plugin Management Console in XperienCentral or copy the file to the
C:\GX\XperienCentral\work\deploy
folder manually. - It takes a few seconds for XperienCentral to extract the plugin, read the contents and the XML descriptor files and then make the design template available. It is possible to check whether the new design template is available by logging in to the edit environment and opening the Configuration > Design templates panel. Set the scope to "page" and you should see your new design template.
...