[opencms-dev] Two (or more) pages in one frametemplate

Paul Adams paul.adams at satsumas.com
Mon Mar 3 06:10:51 CET 2003


Hi all,
 
I wish to implement a simple newsflash function by having my frametemplate pick up the contents of a second "hardcoded" page in one table cell along with the body of the selected page within another. Ideally I want what ammounts to a simple HTML include feature.
 
I have tried creating a simple class to get the HTML of a URI passed in as a parameter:
 
   CmsXmlTemplateFile templateDocument = getOwnTemplateFile( cms, templateFile, elementName, parameters, templateSelector );
    
    String uri = (String)parameters.get("newsflash.URI") ;
    CmsFile file = cms.readFile( uri );
    String text = new String( file.getContents() );
     templateDocument.setData( "newsflash", text );
    
    return startProcessing(cms, templateDocument, elementName, parameters, templateFile);
 
However, this returns the control code and not the HTML. 
 
Can anyone point me in the right direction?
 
Regards
Paul Adams



More information about the opencms-dev mailing list