PloneDocumentation
  • Documentation
  • Adapting & Extending Plone
  • Theming Plone
  • Old-Style Plone Theming
  • Theming guide for Plone 3
  • Logo
  • Previous
  • Next

Warning

This version is valid for an outdated version of Plone: 4.X. Use the Version drop-down above to go to the Plone 6 or Plone 5 versions

  • Introduction
  • Quickstart
  • Working with Content
  • Adapting & Extending Plone
    • Basic Changes (Look and Feel)
    • Theming Plone
      • plone.app.theming manual
      • Diazo theme engine guide
      • Quick Test Recipe
      • Create a Plone theme product with Diazo
      • Front-end: templates, CSS and Javascript
      • Old-Style Plone Theming
        • Theming guide for Plone 3
          • Preface
          • Introduction
          • Quick start
          • Approaches
          • Tools
          • Building blocks
          • Page
          • Elements
            • Anatomy of a Viewlet
            • Override viewlet
            • Move viewlet
            • Anatomy of a Viewlet Manager
            • Creating a New Viewlet Manager
            • Moving, Removing or Hiding a Viewlet Manager
            • Anatomy of a Portlet
            • Moving, Removing or Hiding a Portlet
            • Overriding a Portlet
            • Override the portlets in Plone 3.0
            • Creating a New Portlet Manager
            • Moving or Removing a Portlet Manager
            • Hiding a Portlet Manager
            • Adding Portlet Managers
            • Header
            • Document Actions
            • Language Selector
            • Content History
            • Related Items
            • Workflow History
            • Byline
            • Keywords
            • Colophon
            • Comments
            • Content Actions
            • Content Views
            • Footer
            • Global Sections
            • Lock
            • Logo
              • Customizing in your own product
                • Sample files & directives
            • Next Previous
            • Path Bar (Portal Breadcrumbs)
            • Personal Bar
            • Presentation
            • Search Box
            • Site Actions
            • Table of Contents
            • Analytics
            • Dublin Core Metadata
            • KSS Base Url
            • HTML Head Title
            • Author Link
            • Favicon Link
            • Navigation Link
            • RSS Link
            • Search Link
            • Next Previous Links
            • Skip Links
            • Elements
          • Where is what?
    • Configuration and Control panel
    • Installing Add-ons
    • Custom Content-Types
  • Installing, Managing and Updating Plone
  • Developing for Plone
  • Appendices
  • About this documentation
  • License for Plone Documentation
  • Asking for help
Table Of Content

Logo¶

The site logo.

Snippet:
<a id="portal-logo" ...>... </a>
CSS:
public.css
Name:
plone.logo
Type:
viewlet
Use:
Site Setup > Zope Management Interface > portal_view_customizations
Go to:
plone.logo
Further information:
https://plone.org/documentation/kb/where-is-what/the-logo See also the Quick Start Section of this manual.

Customizing in your own product¶

The following details will help you locate the files that you will need to copy into your own product. They will also help you to provide the correct information to create your own zcml directives, Python classes, and interfaces.See viewlet for more information.

Located in:

  • [your egg location]/plone/app/layout/viewlets/
  • [your egg location]/plone.app.layout-[version].egg/plone/app/layout/viewlets/
Template Name:
logo.pt
Class Name:
plone.app.layout.viewlets.common.LogoViewlet
Manager:
plone.portalheader (name) plone.app.layout.viewlets.interfaces.IPortalHeader (interface)

Sample files & directives¶

Put a version of logo.pt in [your theme package]/browser/templates)

Modify the logo.pt to suit your needs. For example, if you want to use an image named something other than logo.jpg, you could use this code and style #header in your mytheme.css file.

<a metal:define-macro="portal_logo"
   id="portal-logo"
   accesskey="1"
   tal:attributes="href view/navigation_root_url"
   i18n:domain="plone">
    <!-- <img src="logo.jpg" alt=""
         tal:replace="structure view/logo_tag" /> --> <!--commenting out the code that normally looks for logo.jpg -->
    <div id="banner"><!-- style this div in your mytheme.css --></div></a>

Create your own version of the class in [your theme package]/browser/[your module].py

from plone.app.layout.viewlets.common import LogoViewlet
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
class [your class name](LogoViewlet):
    render = ViewPageTemplateFile("[your template name]")

Wire up your viewlet in [your theme package]/browser/configure.zcml

<browser:viewlet
    name="[your namespace].[your viewlet name]"
    manager="plone.app.layout.viewlets.interfaces.IPortalHeader"
    class=".[your module].[your class name]"
    layer=".interfaces.[your theme specific interface]"
    permission="zope2.View"
/>

In [your theme package]/profiles/default/viewlets.xml

Hide the original viewlet (if you wish)

<object>
    <hidden manager="plone.portalheader" skinname="[your skin name]">
        <viewlet name="plone.logo" />
    </hidden>

Insert your new viewlet in a viewlet manager

    <order manager="plone.portalheader" skinname="[your skin name]"
           based-on="Plone Default">
        <viewlet name="[your namespace].[your viewlet name]"
                 insert-before="*" />
    </order>
</object>

'

  • Documentation
  • Adapting & Extending Plone
  • Theming Plone
  • Old-Style Plone Theming
  • Theming guide for Plone 3
  • Logo
  • Previous
  • Next
Further help resources:
  • Community discussion
  • Stackoverflow
  • IRC Chat
More info on the Plone project:
  • Plone Foundation
  • Providers & Consultants
About this documentation:
  • Contribute
  • These docs on Github
Download:
  • Plone
  • Plone add-ons
Plone

The text and illustrations in this website are licensed by the Plone Foundation under a Creative Commons Attribution 4.0 International license. Plone and the Plone® logo are registered trademarks of the Plone Foundation, registered in the United States and other countries. For guidelines on the permitted uses of the Plone trademarks, see https://plone.org/foundation/logo All other trademarks are owned by their respective owners. Hosted by Rackspace.

This page uses Google Analytics to collect statistics. You can disable it by blocking the JavaScript coming from www.google-analytics.com.