[opencms-dev] Inserting linked content using OpenCMS 5.x
Gavin, Ben
BGavin at SkylineTechnologies.com
Wed Dec 1 23:46:17 CET 2004
OK,
Here's a second response to this solution. I have put in the code
that you provided into my main.jsp template [currently dummied up since
I'm testing with only a single page]. However, after making the
changes, the result is the same. The content that I'm trying to
convince the system to pass through doesn't change in any way. It's as
if the system doesn't know to actually process the body contents as a
JSP/whatever file. So I guess my question is [and this relates to
putting in images and the like from a gallery as well], how does the
OpenCMS system know when to "correct"/"realign" the links it's creating?
Maybe I'm just being stupid here, but when I insert an image from the
gallery it puts that /opencms/opencms stuff at the front of the URL
[rather than referencing it through a more "abstract" method akin to
cms.gallery( "/pics/site-images/blah" )].
Maybe I'm just making this too complicated, but as I'm building these
pages, my box has the /opencms/opencms header [and I do _not_ desire to
change that], but when I bundle up this module and put it out on my
staging environment, that environment does not use the /opencms/opencms
bits [or will not, it does not yet exist]. So the feeling that I have
is that all my links and things will be broken. This would not be the
case if I was able to specify similar functionality to the JSP pages
where I can use the cms.link() function to actually generate a link
which is based on where in the hierarchy the thing I'm linking to
actually exists...
Does this make any sense? Am I missing something fundamental here?
It's like there is processing at a million different levels except the
one where it would be most useful, taking the content that the user puts
in through the page editor and doing pre-processing prior to output [to
resolve images, links, etc].
Thanks!
Ben
-----Original Message-----
From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Thomas Maerz
Sent: Wednesday, December 01, 2004 3:42 PM
To: The OpenCms mailing list
Subject: Re: [opencms-dev] Inserting linked content using OpenCMS 5.x
"Gavin, Ben" <BGavin at SkylineTechnologies.com> writes:
> Unfortunately that won't work, because the engine doesn't seem to
> parse the included files when they are body elements [at least not in
> that way]. Any other ideas?
| CmsFile file = cmsObject.readFile( "/system/bodies" + target );
| CmsXmlTemplateFile hXml = new CmsXmlTemplateFile( cmsObject, file );
| String body = ""; try
| {
| body = hXml.getProcessedDataValue( "template" );
| }
| catch ( CmsException exc )
| {
| }
Regards,
Thomas
_______________________________________________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please
visit
http://mail.opencms.org/mailman/listinfo/opencms-dev
More information about the opencms-dev
mailing list