Most of jetspeed templates that we are using are written using Velocity hence the file extension being ``vm'' which stands for Velocity Macro.
Velocity is a Java-based template engine. It permits web page designers to reference methods defined in Java code. Web designers can work in parallel with Java programmers to develop web sites according to the Model-View-Controller (MVC) model, meaning that web page designers can focus solely on creating a well-designed site, and programmers can focus solely on writing top-notch code. Velocity separates Java code from the web pages, making the web site more maintainable over the long run and providing a viable alternative to Java Server Pages (JSPs) or PHP.
The reference web page could be found at: http://jakarta.apache.org/velocity.
Location: /jetspeed/WEB-INF/templates/vm/screens/html/NewAccount.vm
This template create a form that a new user need to fill out to obtain a new user ID.
All of the fields that are used in this form have to be registered in the ExtInfo.java (ask YS to add the new variables) before you are able to used it.
For example the field FIRST_NAME is already registerd in ExtInfo therefore we can use this as a reference in this syntax:
$ExtInfo.FIRST_NAME() -- as the input name $User.get($ExtInfo.FIRST_NAME()) -- as the value of the input name In HTML form context this will look like this: <INPUT NAME="$ExtInfo.FIRST_NAME()" TYPE="TEXT" VALUE="$User.get($ExtInfo.FIRST_NAME())">
Location: /jetspeed/WEB-INF/psml/anon/html/default.psml
A new users home page is copied from the user TURBINE. Thus you should customized the TURBINE's user home page to reflect the desired default home page for new users.
Location: /jetspeed/WEB-INF/psml/user/turbine/html/default.psml
Location: /jetspeed/byname
Location: /jetspeed/WEB-INF/templates/vm/byname/html/verification_email.vm Location: /jetspeed/WEB-INF/templates/vm/byname/html/confirmation_email.vm
Location: /jetspeed/WEB-INF/templates/vm/portlets/html/byname-createNewUser.vm Location: /jetspeed/WEB-INF/templates/vm/portlets/html/byname-login.vm Location: /jetspeed/WEB-INF/templates/vm/portlets/html/byname-msgCenter.vm
The look of Jetspeed's portal is controlled by the layout and navigation templates. Below are some of the file that define that look.
A Layout Manager is used in the generation of the resulting portal. Jetspeed support 2 Layout Manager, JSP and Velocity. Both layout manager produce the similar results, which one you use is dictated by which language you prefer.
Since we are using Velocity, the files uses by the Velocity Layout Manager are:
/jetspeed/WEB-INF/template/vm/layouts/html/default.vm
-- Display the logo in the upper left hand corner and
define the top, bottom, and left navigation bars.
/jetspeed/WEB-INF/template/vm/navigations/html/top.vm
-- Top navigation bar when the user it NOT logged in.
/jetspeed/WEB-INF/template/vm/navigations/html/left.vm
-- Left navigation bar for all users.
/jetspeed/WEB-INF/template/vm/navigations/html/bottom.vm
-- Bottom navigation bar for all users.
To customize/update the navigation bars, follow these steps:
Any site specific portlets should be define in the local-portlets.xrg. Everytime a new portlet is created it has to be registered in this file.
Location: /jetspeed/WEB-INF/conf/local-portlets.xrg
Below is the example of page that is created using Velocity template.
<portlet-entry name="MsgCenter" hidden="false" type="instance" application="false">
<meta-info>
<title>Message Center</title>
</meta-info>
<classname>org.apache.jetspeed.portal.portlets.VelocityPortlet</classname>
<parameter name="action" value="portlets.MsgCenterAction" hidden="false"/>
<parameter name="template" value="byname-msgCenter" hidden="false"/>
<media-type ref="html"/>
</portlet-entry>
Below is the eaxmple of portlet that are created directly from its static html file.
<portlet-entry name="byname-frontpage" hidden="false" type="ref"
parent="HTML" application="false">
<url>/byname/byname-frontpage.html</url>
</portlet-entry>