util:rewrite

A simple tag to rewrite/calculate the path to specified file. The calculate path will be returned as a java.lang.String.

There are two different types of paths you can get from this tag. One is the url to the file, and the other is the file path to the file.

There are several roots that can be used to calculate the path.

  • publication

  • template

  • multimedia

  • section

Syntax
<util:rewrite
   file="..."
   id="..."?
   root="..."
   type="..."?/>
Attributes
id, no runtime expressions

Id is not mandatory. If specified the path is returned as a scripting variable (and associated page scope attribute). If not specified the path will be written.

file, mandatory

Name of the file.

root, mandatory

The root of the file. Allowed values:

type

The type of path. Allowed values:

Default value is url.