[opencms-dev] Swapping the body within the page launcher

Olli Aro olli_aro at yahoo.co.uk
Wed Jul 2 12:12:02 CEST 2003


Hello OpenCMS Developers,

I am currently in process of creating my customised launcher class from
com.opencms.launcher.CmsXmlLauncher. I am trying to select an alternative
body from the one defined within the control code. As far as I can read the
code, I should be able to swap the body by editing the code starting from
line 191 (see below).

String template = doc.getElementTemplate(elementName);
                    if
(I_CmsConstants.C_XML_BODY_ELEMENT.equalsIgnoreCase(elementName)) {
                        // found body element
                        if (template != null) {

cms.getRequestContext().setAttribute(I_CmsConstants.C_XML_BODY_ELEMENT,
template);
                        }
                    }
                    newParameters.put(elementName + "._TEMPLATE_",
template);

However, it seems changing this does not have any effect. Do I have to
define the body somewhere else? Could the body selection be hardcoded within
the callCanonicalRoot method, which returns the parsed content?

Thanks,

Olli
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.495 / Virus Database: 294 - Release Date: 30/06/2003





More information about the opencms-dev mailing list