Sun GlassFish Web Space Server 10.0 Administration Guide

Templates

This section describes how to create, edit, and delete a template.

ProcedureTo Create a Template

  1. Log in to Web Space Server.

  2. Navigate to Control Panel -> Content -> Web Content from the Welcome menu.

  3. Click the Templates tab and click the Add Template button to create a template.

    The Template page appears.

  4. Type an ID, Name and Description for the template. Click the Select button to select a Structure for the template.

    The Select and Remove buttons corresponding to the Structure field can be used to associate or to disassociate a structure from the Template.

    A window for selecting Structures is launched.

  5. Select a structure.

  6. To edit the template layout content, you can use one of two methods.

    • To create a new template:

      1. Click the Launch Editor button.

        An Editor appears.

      2. Select an Editor Type: Plain or Rich. Plain is the default.

      3. Click Update after making changes to the template.

    • To use an existing template:

      1. Select a language from the Language Type list: VM, SXL, CSS.

        VM, SXL, and CSS are the available language options.

      2. Click the Browse button to upload the script for an existing template.

      3. Select the Format Script option.

      4. Click Launch Editor to open the browsed script.

      5. Modify the template.

      6. Click Update after making changes to the script.

  7. If desired, add a small image to represent the template in the description fields by selecting the Use Small Image option.

    You can type the URL path for an image in the Small Image URL field, or you can browse an image using the Browse button.

  8. Click Save.

    The template is created successfully and the system generates a WebDAV URL for the template. WebDAV (web-based distributed authoring and versioning) enables remote access of the template. To determine the WebDAV URL for the template, open the template in edit mode.

    For details about WebDAV go to:

    http://en.wikipedia.org/wiki/WebDAV

    http://www.webdav.org/

ProcedureTo Edit a Template

Before editing the actual template, you might want to view the associated articles whoselayout will be affected by any changes made to your template. Click View Articles from the Action menu to view associated articles.

  1. Log in to Web Space Server.

  2. Navigate to Control Panel -> Content -> Web Content from the Welcome menu.

  3. Click the Templates tab.

  4. Click the Actions button corresponding to a template, and choose Edit from the menu.

  5. Edit the template as desired.

    In the edit screen, you can edit anything in the template except for the template ID, which cannot be changed once the template has been created.

  6. Click Save.

  7. If desired, click View Articles to see the articles with the new template layout.

ProcedureTo Delete a Template

  1. Log in to Web Space Server.

  2. Navigate to Control Panel -> Content -> Web Content from the Welcome menu.

  3. Click the Templates tab.

    To delete a template, you must first delete all the articles associated with that template.

  4. To delete all articles, click the Actions button and choose View Articles from the menu.

    All the articles associated with the Template are listed.

  5. Select all articles, and click Delete.

    A dialog box with the message “Are you sure you want to delete the selected articles?” appears. Click OK to delete all articles.

  6. Click the Templates tab once again.

  7. Select the template and click Delete.

    Click OK on the dialog box to confirm deleting the template.