[opencms-dev] Include problems with cms:link inside an include

Mark Robson mark at gensortium.com
Thu Jul 10 16:13:01 CEST 2003


Hi there.

I have a JSP include which I am using in numerous templates without a 
problem. I include it with the <%@ include %> in these templates.

Now I want to include the same file in a JSP outside of the templates. This 
JSP will be part of my site.

When I include it with <%@ include %>, any calls to 

<cms:link>../resources/images/something.gif</cms:link>

Generate broken links because the relative path 
"../resources/images/something.gif" is not right for the location of my JSP.

So I tried to use <cms:include> instead - and that makes things worse! The 
<cms:link> Gets ignored inside a <cms:include> file, and ends up being sent 
to the browser!

Is there any way (except by using absolute paths) that I can make this work 
while reusing the include between the JSP template and a standard JSP?

Or do I have to use absolute paths *EVERWHERE* inside my includes?

As ever, I want the answer preferably by yesterday :)

Regards
	Mark Robson



More information about the opencms-dev mailing list