Tag library reference for the following tag libraries:
CMS Utility Tag Library
This is version 3.5.
Required attributes are marked with a *
adds an attribute to the aHref tag (child as aHref)
Can contain: EMPTY
| Name | Description | Type |
|---|---|---|
| name* | the name of the attribute | String |
| value | the value of the attribute | String |
checks if the atom contains a non-empty String value and builds a link if true or tries to find the first page with a specific template Name, starting from a specific page.
Can contain: JSP
<cmsu:aHref ... />
| Name | Description | Type |
|---|---|---|
| level | level from where to start the template search | int |
| nodeDataName | String | |
| postHref | href part that is added after the nodeData content | String |
| preHref | href part that is added before the nodeData content | String |
| templateName | template name to search for | String |
| atomName | @deprecated use nodeDataName | String |
displays a breadcrumb
Can contain: EMPTY
| Name | Description | Type |
|---|---|---|
| activeCss | Css class added to the current page link | String |
| delimiter | displayed between the page names, e.g. ">" | String |
| excludeCurrent | exclude the current (active) page from the breadcrumb. Defaults to false | boolean |
| hideProperty | Name for a page property which, if set, will make the page hidden in the breadcrumb. | String |
| link | Create links to pages. Defaults to true | boolean |
| startLevel | at which level to start. Often you will want to omit top levels, e.g. if you split your site into multiple languages | String |
| titleProperty | Name for a page property which holds the title to display in breadcrumbs. If empty, the standard title is used. | String |
Writes an html img tag for the image at "nodeDataName". Also supports writing object tags for flash movies (detected by the "swf" extension.
Can contain: EMPTY
| Name | Description | Type |
|---|---|---|
| altNodeDataName | Name of the node data holding the alt text for the image. If not set the default is nodeDataName + "Alt". The same value is added to the "title" attribute, if not null. | String |
| class | html pass through attribute | String |
| contentNode | The content object to use. | String |
| contentNodeCollectionName | See cms:out | String |
| contentNodeName | See cms:out | String |
| height | html pass through attribute | String |
| id | html pass through attribute | String |
| inherit | Inherit the value from parent pages, if not set in the current one. | boolean |
| nodeDataName* | the name of the nodeData containing the image path | String |
| style | html pass through attribute | String |
| width | html pass through attribute | String |
Converts text in the body of the tag adding <br /> tags at new lines or wrapping lines in paragraphs.
Can contain: JSP
| Name | Description | Type |
|---|---|---|
| para | If true each line will be wrapped in a <p> tag. Default to false (use br's). | boolean |
Redirects to the first child page. If the server is an authoring instance or magnolia and the preview mode is not active the tag will simply add to the pagecontext a variable named from the var attribute containing the path of the child page.
Can contain: empty
<cmsu:redirect var="destpage" />
This page has no content and it will redirect to
<a href="${pageContext.request.contextPath}${destpage}">${destpage}</a> in a public instance.
| Name | Description | Type |
|---|---|---|
| var | name for the variable which will contain the URL of the page this tag will redirect to | String |
Creates a scaled copy of an image.
Can contain: EMPTY
| Name | Description | Type |
|---|---|---|
| imageContentNodeName* | The name of the new contentNode that will contain the scaled version of the image. | String |
| maxHeight | The maximum height of the image in pixels. | int |
| maxWidth | The maximum width of the image in pixels. | int |
| parentContentNodeName | The name of the content node that contains the image to be copied and scaled. | String |
| parentNodeDataName* | The name of the data node that cotains the image data to be copied and scaled. | String |
Output a set of snippets taken from any paragraph in the given page mathing any of the search term.
Can contain: EMPTY
<cmsu:simplesearch query="${param.search}" var="results" />
<c:forEach items="${results}" var="page">
<cmsu:searchResultSnippet query="${param.search}" page="${page}" />
</c:forEach>
| Name | Description | Type |
|---|---|---|
| chars | Number of characters to include in search snippets. Default is 100. | int |
| maxSnippets | Maximum number of snippets to print out. | int |
| page* | A Content node of type mgnl:content (a magnolia page), typically returned by the simpleSearch Tag | info.magnolia.cms.core.Content |
| query* | Search query | String |
Sends a simple mail generated with all the fields found in nodeCollectionName.
Can contain: empty
| Name | Description | Type |
|---|---|---|
| bcc | Mail "bcc" field | String |
| cc | Mail "cc" field | String |
| from* | Mail "from" field | String |
| logging | Log all the information sent by the mail. | String |
| loggingDirectory | Where to log to. For each page the log is created separately on a weekly base | String |
| loggingEncoding | Encoding of the log file. Default is UTF8. For windows excel use ISO-8859-1 | String |
| loggingExtension | The file extension to use for new files. Default is log. Use csv for easy opening with Excel | String |
| loggingFilename | Name for the file (without extension). If not set, the pages path is used to create a file | String |
| nodeCollectionName | Collection (paragraphs) that holds the configured form fields. If not set the current collection is used. | String |
| redirect | Page to redirect to after a successfull submission | String |
| replyTo | Mail "replyTo" field | String |
| subject* | Mail "subject" field | String |
| template | Instead of the mail type you can define a template to use. This template must be registered in the mail module | String |
| to* | Mail "to" field | String |
| type | Mail type. used to get the mail from the factory | String |
Draws a simple, css based, navigation menu. The menu layout can then be customized using css, and the default menu should be enough for most uses.
Can contain: EMPTY
<cmsu:simpleNavigation startLevel="3" style="mystyle"/>
Will output the following:
<ul class="level3 mystyle">
<li><a href="...">page 1 name </a></li>
<li><a href="...">page 2 name </a></li>
<li class="trail"><a href="...">page 3 name </a>
<ul class="level3">
<li><a href="...">subpage 1 name </a></li>
<li><a href="...">subpage 2 name </a></li>
<li><strong><a href="...">selected page name </a></strong></li>
</ul>
</li>
<li><a href="...">page 4 name </a></li>
</ul>
| Name | Description | Type |
|---|---|---|
| classProperty | Name for a page property that will hold a css class name which will be added to the html class attribute. | String |
| endLevel | The end level for navigation, defaults to 0. | int |
| expandAll | Sitemap mode. Can be assigned the "show" value. Only showable pages will be displayed. Any other value will result in displaying all pages | String |
| hideInNav | Name for the "hide in nav" nodeData. If a page contains a boolean property with this name and it is set to true, the page is not shown in navigation. Defaults to "hideInNav" | String |
| nofollow | Name for the "nofollow" nodeData. If a page contains a boolean property with this name and it is set to true, rel="nofollow" will be added to the generated link (for links the should be ignored by search engines). | String |
| openMenu | Name for the "open menu" nodeData. If a page contains a boolean property with this name and it is set to true, subpages are always shown also if the page is not selected. Defaults to "openMenu" | String |
| startLevel | The start level for navigation, defaults to 0. | int |
| style | The css class to be applied to the first ul. | String |
| wrapperElement | When specified, all links will have the anchortext wrapped in the supplied element (such as "span") | String |
A simple tag which allows searching in all the site content with a "natural language" query. It simply strips all the reserved chars from input string, build an xpath query and feed Magnolia QueryManager. By defaults search terms are ANDed, but it also supports using the AND or OR keywords in the query string. Search is not case sensitive and it's performed on any non-binary property.
Can contain: EMPTY
<cmsu:simplesearch query="${param.search}" var="results" />
<c:forEach items="${results}" var="page">
<a href="${pageContext.request.contextPath}${page.handle}.html">${page.title}</a>
</c:forEach>
| Name | Description | Type |
|---|---|---|
| itemType | The itemTypes search/returned by this tag. Default is mgnl:content which is used for pages | String |
| query* | Query to execute (e.g. "magnolia AND cms OR info") | String |
| repository | The repository we search in. Default is website repository | String |
| scope | Scope for the variable. Can be "page" (default), "request", "session", "application" | String |
| startLevel | The start level for search, defaults to 0. Can be used to limitthe search only to the current website tree | int |
| supportSubstringSearch | Seach for substrings too. This can decrease performance. Default value is false | boolean |
| useSimpleJcrQuery | Set to false to generate the search query as it was generated until Magnolia 3.5.4 (which will force a search on non-indexed word, which usually leads in less good results). Default value is true. See "6.6.5.2 jcr:contains Function" from the JCR Spec (pages 110-111) for details. | boolean |
| var* | A collection of Content nodes (pages) will be added to the pagecontext with this name. | String |
converts a string to an object using split.
Can contain: JSP
| Name | Description | Type |
|---|---|---|
| delims | delimiters characters; default: /n | String |
| var* | name of the pageContext variable where the obj is put to | String |
Table
Can contain: JSP
| Name | Description | Type |
|---|---|---|
| cellpadding | Standard html attribute | String |
| cellspacing | Standard html attribute | String |
| class | Standard html attribute | String |
| header | Use first row as column headers | boolean |
| id | Standard html attribute | String |
| style | Standard html attribute | String |
Convert the text to images.
Can contain: EMPTY
| Name | Description | Type |
|---|---|---|
| divCSS | The CSS class that will be applied to the div that contains these text images. If the attribute is not set (default) no div will be written. | String |
| imageContentNodeName* | The name of the new contentNode to create, under which all image nodes will be saved. | String |
| parentContentNodeName | The name of the parent of the new contentNode. | String |
| text* | The text to be converted. | String |
| textBackColor | The color of the background in hexadecimal format, e.g. 'ff0044'. Default is 'ffffff' (white) | String |
| textFontColor | The color of the text in hexadecimal format, e.g. 'ff0044'. Default is '000000' (black) | String |
| textFontFace | The font face of the text, e.g. 'Helvetica'. Default is 'Helvetica' | String |
| textFontSize | The size of the text, in points, e.g. 12. Default is '12' | int |
| textSplit | The method used to split the text into sub-strings: 'none', 'words', or 'characters'. Default is 'none' | String |
Simulates the xmp tag, escaping content. This is useful for displaying code examples.
Can contain: JSP
This tag has no attributes.
@deprecated see cms-taglib:out.
Can contain: EMPTY
| Name | Description | Type |
|---|---|---|
| actpage | @deprecated if "true" atom is taken from the currently active page | boolean |
| atomName | @deprecated | String |
| language | @deprecated Locale string (see java.util.Locale) | String |
| nodeDataName | @deprecated where the date comes from | String |
| pattern | @deprecated (see java.text.SimpleDateFormat) - defaults "yyyy.MM.dd - HH:mm:ss" | String |
@deprecated see cms:out. Returns informations as path, name or size of a file
Can contain: EMPTY
| Name | Description | Type |
|---|---|---|
| contentNodeName | @deprecated if left empty, local contentNode is used as set by contentNodeIterator, otherwise the global contentNode is used | String |
| fileNameOnly | @deprecated if "true", the file name without the path will be generated | String |
| nodeDataName* | @deprecated | String |