To create a new or modify an existing template, following the instructions in this section. You can create a template in one of the following three ways:
Export the template, add content, and import the content using the psadmin utility.
Create content and import the content to overwrite existing template.
Add new files to existing templates.
Go to the communityTemplateBaseDir.
Create a:
New directory for the new template
Copy an existing template to the new template directory
For example, type:
cd PortalServer-DataDir/portals/portal-URI/communitytemplates mkdir NewTemplate cp 2column/* NewTemplate/ |
Modify the role based display profile documents in the new template directory as needed.
For more information on the role based display profile documents, see Template Syntax and Semantics.
Create and edit the properties file to include the properties described in Template Descriptor File and save the file.
For example, to create a new properties files for the new template, type:
cp 2colimn.properties NewTemplate.properties |
Or,
touch NewTemplate.properties |
In order to see the newly added template, log out of any current portal session and re-login to see the change.
Go to the communityTemplateBaseDir/template directory and open the file you wish to modify.
Log out of any current portal session and re-login to see the change.
In a muti-portal environment (when there are more than one portal on the system), use PAR mechanism (as opposed to directly editing files in communityTemplateBaseDir) so that the change of community templates can be applied across multiple portals. This will allow all the portals to have the same set of community templates. If you do not wish to have synchronized environment across portals, use the instructions outlined in To Create a New Template for Single Portal Environment.
Either use psadmin export --type desktop to export desktop data (which includes community templates) and then export it so the content can be edited or, create a new PAR structure from scratch with only the community templates and no other desktop data.
Follow instructions in To Create a New Template for Single Portal Environment to edit content.
Create a new PAR file which contains:
-+-- META-INF -- MANIFEST.MF | +-- pbfiles -+-- communityTemplateBaseDir -+-- template1 -+-- deleted.xml | | | | | +-- disabled.xml | | | | | +-- member.xml | | | | | +-- owner.xml | | | | | +-- visitor.xml | | | +-- template1.properties | | | +-- template1_en.properties | | | +-- template1_fr.properties | | | +-- ... | +-- static -- community -- images -- template1.gif
Edit or add content as needed.
Create a new PAR file.
Use psadmin import subcommand to import the PAR content across all portals.
If you exported all desktop data, note that psadmin export subcommand will export all desktop data; if you create a new PAR structure from scratch with only the community templates, the command will only export community templates.
For more information, see the psadmin export in Sun Java System Portal Server 7.2 Command-Line Reference.