Index: client/src/main/java/org/hippoecm/hst/tag/HstLinkTag.java =================================================================== --- client/src/main/java/org/hippoecm/hst/tag/HstLinkTag.java (revision 58589) +++ client/src/main/java/org/hippoecm/hst/tag/HstLinkTag.java (working copy) @@ -36,6 +36,7 @@ import org.apache.commons.lang.StringUtils; import org.hippoecm.hst.configuration.hosting.Mount; import org.hippoecm.hst.configuration.sitemap.HstSiteMapItem; +import org.hippoecm.hst.content.beans.ObjectBeanManagerException; import org.hippoecm.hst.content.beans.standard.HippoBean; import org.hippoecm.hst.content.beans.standard.IdentifiableContentBean; import org.hippoecm.hst.core.linking.HstLink; @@ -64,6 +65,8 @@ protected IdentifiableContentBean identifiableContentBean; + protected String nodeId; + protected String path; protected String siteMapItemRefId; @@ -157,6 +160,14 @@ } } + if (hippoBean == null && nodeId != null) { + try { + hippoBean = (HippoBean) reqContext.getObjectBeanManager().getObjectByUuid(nodeId); + } catch (ObjectBeanManagerException e) { + log.warn("Cannot find content bean by id: '{}'.", nodeId); + } + } + if(linkForAttributeSet) { if(link == null && path == null && hippoBean == null && siteMapItemRefId == null) { String dispatcher = (String)servletRequest.getAttribute("javax.servlet.include.servlet_path"); @@ -346,6 +357,7 @@ super.cleanup(); var = null; identifiableContentBean = null; + nodeId = null; scope = null; path = null; siteMapItemRefId = null; @@ -392,6 +404,10 @@ return this.identifiableContentBean; } + public String getNodeId(){ + return this.nodeId; + } + public String getPath(){ return path; } @@ -463,7 +479,11 @@ linkForAttributeSet = true; this.identifiableContentBean = identifiableContentBean; } - + + public void setNodeId(String nodeId) { + this.nodeId = nodeId; + } + public void setMount(String mount) { this.mountAlias = mount; } Index: client/src/main/resources/META-INF/hst-core.tld =================================================================== --- client/src/main/resources/META-INF/hst-core.tld (revision 58589) +++ client/src/main/resources/META-INF/hst-core.tld (working copy) @@ -332,6 +332,13 @@ org.hippoecm.hst.content.beans.standard.IdentifiableContentBean + Identifier of an IdentifiableContentBean object. This is a stringified identifier of one of your bean mapped objects + nodeId + false + true + java.lang.String + + A string id, which is the refId of a sitemap item you want to link to. Note that the sitemapitem belonging to the refId should not be a wildcard matcher, and non of its ancestors should be a wildcard. Using this to create a link to a sitemap item can be handy when you know to which sitemap item you want to link, but