OpenCms JSP standard taglib
Tag link


The tag adjusts the links to the OpenCms VFS provided in the tag's body (including request parameters). Links MUST be adjusted to work correctly, because resources might be statically exported and also absolute pathes to resources that are not exported must be extended by the prefix "/{webapp name}/opencms".

Example: <cms:link>/vfslink/to/my/index.html</cms:link>

Note that the tag is necessary for all links given as arguments to "normal" HTML tags. For OpenCms specific tags, links are sometimes adjusted anyway and thus the tag must not be used.


Tag Information
Tag Classorg.opencms.jsp.CmsJspTagLink
TagExtraInfo ClassNone
Body ContentJSP
Display NameNone

Attributes
NameRequiredRequest-timeTypeDescription
baseUrifalsetruejava.lang.StringChange the URI of the current request context to the provided value.

This is useful if links to detail pages (e.g., ... href="<cms:link baseUri="...">${elem.filename}</cms:link>" ...) have to be set in content that is loaded on demand via AJAX. Otherwise, in this use case the wrong or even no detail page may be found.
localefalsetruejava.lang.StringThe locale for which the link should be created. This has only influence, if you use the CmsLocalePrefixLinkSubstitutionHandler. The locale prefix will be added according to the given locale. If no locale is given, the locale of the current request context is used.
detailPagefalsetruejava.lang.StringSet this attribute to link to a specific detail page.

Variables
No Variables Defined.


Output Generated by Tag Library Documentation Generator. Java, JSP, and JavaServer Pages are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 2002-4 Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054, U.S.A. All Rights Reserved.