[opencms-dev] Inserting linked content using OpenCMS 5.x
Gavin, Ben
BGavin at SkylineTechnologies.com
Wed Dec 1 23:20:17 CET 2004
OK,
I really appreciate your help thus far, but could you possibly provide
a more complete example, there are all sorts of variables in the code
snippets which are not defined. The cmsObject bit I was able to grab
from the CmsJspActionElement::getCmsObject() call, but I'm uncertain
where you are getting the "target" variable from. I also managed to
track down what imports I would need to make the code compile. I assume
that target is some derivative of the current uri, but is there a
portable way to get that, other than grabbing the request context's uri
and stripping off the "/opencms/opencms" lead in?
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