[opencms-dev] generating absolute path (with http://) using cms:link

Tom Wolf twb15 at hotmail.com
Tue Nov 25 07:44:16 CET 2014


Thanks Paul,
This did the trick:                CmsFlexController controller = CmsFlexController.getController(req);                CmsObject cms = controller.getCmsObject();
                // resolve possible relative URI                newlink = OpenCms.getLinkManager().getOnlineLink(cms, link);

For those who are interested:
I created a new class that inherits CmsJspTagLink and overrides doEndTag() to accomplish thisI also had to create a tld file and an exportpoint to /WEB-INFA Tomcat restart was in need

From: flakstad at npolar.no
To: opencms-dev at opencms.org
Date: Mon, 24 Nov 2014 13:54:35 +0100
Subject: Re: [opencms-dev] generating absolute path (with http://) using cms:link

Hi Tom, This is probably what you’re looking for:  org.opencms.main.OpenCms.getLinkManager().getOnlineLink(myCmsObject, myResourcePath); (I’m sure there’s an EL equivalent, but can’t help you there.) Also, see the link manager’s other methods: http://files.opencms.org/javadoc/core/org/opencms/staticexport/CmsLinkManager.html Cheers,Paul From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Tom Wolf
Sent: 24. november 2014 13:13
To: opencms-dev at opencms.org
Subject: [opencms-dev] generating absolute path (with http://) using cms:link Hi all, Is this possible? or should I create my own CmsJspTagLink extension? Thanks
_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20141125/4910f73c/attachment.htm>


More information about the opencms-dev mailing list