How to setup different site logo for each hosted conference

by David Mudrak last modified Dec 30, 2008 05:56 PM
If you are hosting multiple conferences within one Plone site, you can easily modify your global_logo template to display appropriate logo for each conference. This was default feature in early versions of the product, but we do not want to change top-level site templates during installation so this feature was disabled.

To use this feature, simply customize your template

/plone/portal_skins/plone_templates/global_logo

with the following code.

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" i18n:domain="plone">
<body>
<!-- THE PORTAL LOGO DEFINITION -->
<!-- If the currently displayed conference provides its logo, display it -->
<h1 id="portal-logo-custom" metal:define-macro="portal_logo"
tal:condition="python:hasattr(here,'getConfObject')"
>
    <a href="/"
       tal:attributes="href portal_url"
       tal:define="portal_title portal_properties/title;
                   prefLang python:here.portal_languages.getLanguageBindings()[0]"
       >
      <img tal:condition="python:here.getConfObject().getConflogo()" tal:replace="structure python:here.getConfObject().getConflogo()" />
      <b tal:content="python:here.getConfObject().title_or_id()">plone</b>
    </a>
</h1>

<!-- If displaying the page out of any conference scope, display default site logo -->
<h1 id="portal-logo" metal:define-macro="portal_logo"
tal:condition="python:not hasattr(here,'getConfObject')"
>
<a href="/"
tal:attributes="href portal_url"
tal:define="portal_title portal_properties/title;"
tal:content="string:$portal_title"
accesskey="1">
Plone
</a>
</h1>


</h1>
</body>
</html>
Please note: to be honest, I have not tested this ;-) Please test and report.