[opencms-dev] Inserting linked content using OpenCMS 5.x

Thomas Maerz thomasmaerz at gmx.de
Wed Dec 1 22:41:38 CET 2004


"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




More information about the opencms-dev mailing list