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

Olli Aro olli_aro at yahoo.co.uk
Thu Jul 3 12:13:01 CEST 2003


Please ignore the previous. Silly me - the obvious way to do this it to
write a new implementation of CmsXmlTemplate...

Olli

> -----Original Message-----
> From: opencms-dev-admin at opencms.org
> [mailto:opencms-dev-admin at opencms.org]On Behalf Of Olli Aro
> Sent: 02 July 2003 11:01
> To: opencms-dev at opencms.org
> Subject: [opencms-dev] Swapping the body within the page launcher
>
>
> 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
>
>
> _______________________________________________
> 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
> ---
> Incoming 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
>
---
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