•  
Main
About Hippo Portal
Documentation
Community
Other

The site map

The site map is a document that is present in the repository. It serves primarily as a mapping between an url and a portal page. It is also used as mapping to a node (document or folder) in the repository, with which a portlet can retrieve its content.

Structure of the site map

The site map is an XML document with a <sitemap> top level element and nested <fixed-item> and <menu-item> elements. Here's an example site map document, with description below it:

<?xml version="1.0" encoding="utf-8"?>
<sitemap>

  <fixed-item id="404" name="404" title="Page not found" datasource=""/>
  <fixed-item id="login" name="login" title="Login" datasource=""/>

  <!-- Home -->
  <menu-item id="home" name="home" title="Home" datasource="/content/documents/home.xml"/>

  <!-- Menu -->
  <menu-item id="menu" name="menu" title="Menu" datasource="" linkable="false">
      <menu-item id="item1" name="item1" title="Item 1" datasource="/content/documents/item1.xml"/>
      <menu-item id="item2" name="item2" title="Item 2" datasource="/content/documents/item2.xml"/>
  </menu-item>

</sitemap>
Element Description
sitemap top level element
fixed-item A fixed mapping from a part of an url, attribute name, to a (part of a) portal page path, attribute type with fallback id. Fixed means in this context that it is not used in a menu structure, but is an separate link like in a footer, or to a 404 error page. Typically each item is unique, having its own unique id.
menu-item A menu mapping from a (part of an) url, attribute name, to a (part of a) portal page path, attribute type with fallback id.

The following standard attributes can be set on both the <fixed-item> and <menu-item> element.

Attribute Description
datasource A path to a node (document or folder) in the repository, relative to the repository filespath (e.g. /default/files/default.preview/).
hidden Flag to indicate whether this menu item should be shown. Defaults to false.
id Unique identifier for this item. Used for shorthand access to items by id, handy for fixed items such as an error page. Also used as fallback for the type if that attribute not present.
linkable Flag to indicate whether this item has a corresponding portal page. Defaults to true but may be turned off for instance in case it concernes a menu header item that has no document but only submenu items.
name Part of the URL of this item referencing the target portal page.
repository-based Attribute flagging a dynamically generated sitemap structure, based on its datasource attribute.
title Title of the item that may be used as the text that links to the portal page, for instance in the menu.
type Indicates the type of portal page, used to construct the target portal page URL.

Besides the above standard attributes any attribute may be set: it will be kept in the menu item object and can then be used by the portal implementation.

Uploading the site map into the repository

Typically, the sitemap.xml document is located in the repository in a construction folder, so the full path would be /default/files/default.preview/content/documents/construction/sitemap.xml.

As the repository supports a WebDav interface (an extension to HTTP), the document can be inserted using any WebDav client. A couple of Eclipse plugins are available, such as WebDav Pilot by S&N or EasyWebDav .

The Hippo WebDav Maven-1 plugin can also be used. If you don't have it installed yet, run:

maven plugin:download -DartifactId=hippo-webdav-plugin -DgroupId=hippo-webdav-plugin -Dversion=1.0

Now, to upload a file into a running Hippo repository (see component applications for details), the webdav:deploy goal should be used, with some -D options as parameters. The webdav.srcpath is the relative path what file structure should be uploaded, while webdav.destinationurl is the URL where to upload the files in the running repository.

For example, to upload your sitemap at ./content/documents/construction/sitemap.xml (relative to where you are running the maven from), call

maven webdav:deploy 
        -Dwebdav.destinationurl=http://localhost:60000/default/files/default.preview/content 
        -Dwebdav.srcpath=content
        -Dwebdav.username=<username> 
        -Dwebdav.password=<password>