documentation Plone5
stable
  • Introduction
  • Quickstart
  • Working with Content
  • Adapting & Extending Plone
    • Basic Changes (Look and Feel)
      • Change the Logo
        • The Basics
        • 1. Changing the Image in the Site control panel
        • 3. Changing the HTML
        • Further Information
      • Change the Font Colors - deprecated
      • Remove “Welcome!” section from splash page
    • Theming Plone
    • Site Setup
    • 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
documentation Plone5
  • Docs »
  • Adapting & Extending Plone »
  • Basic Changes (Look and Feel) »
  • Change the Logo
  • Edit on GitHub

Change the Logo¶

*** Settings ***

Resource  plone/app/robotframework/server.robot
Resource  plone/app/robotframework/keywords.robot
Resource  Selenium2Screenshots/keywords.robot

Library  OperatingSystem

Suite Setup  Run keywords  Suite Setup  Test Setup
Suite Teardown  Run keywords  Test teardown  Suite Teardown

*** Variables ***

${FIXTURE}  plone.app.robotframework.PLONE_ROBOT_TESTING
@{DIMENSIONS}  1024  768
@{APPLY_PROFILES}  plone.app.contenttypes:plone-content


*** Keywords ***

Suite Setup
    Run keyword if  not sys.argv[0].startswith('bin/robot')
    ...             Setup Plone site  ${FIXTURE}
    Run keyword if  sys.argv[0].startswith('bin/robot')
    ...             Open test browser
    Run keyword and ignore error  Set window size  @{DIMENSIONS}

Test Setup
    Import library  Remote  ${PLONE_URL}/RobotRemote

    Run keyword if  sys.argv[0].startswith('bin/robot')
    ...             Remote ZODB SetUp  ${FIXTURE}

    ${language} =  Get environment variable  LANGUAGE  'en'
    Set default language  ${language}

    Enable autologin as  Manager
    ${user_id} =  Translate  user_id
    ...  default=jane-doe
    ${user_fullname} =  Translate  user_fullname
    ...  default=Jane Doe
    Create user  ${user_id}  Member  fullname=${user_fullname}
    Set autologin username  ${user_id}

Test Teardown
    Run keyword if  sys.argv[0].startswith('bin/robot')
    ...             Remote ZODB TearDown  ${FIXTURE}

Suite Teardown
    Run keyword if  not sys.argv[0].startswith('bin/robot')
    ...             Teardown Plone Site
    Run keyword if  sys.argv[0].startswith('bin/robot')
    ...             Close all browsers

How to substitute the standard Plone logo with your own logo - a through-the-web approach.

The Basics¶

In Plone 5, the logo can be changed TTW in the @@site-controlpanel.

1. Changing the Image in the Site control panel¶

Since Plone 5 you can directly change the logo in the Site control panel. Just upload your custom logo image with the Site logo field.

Change site logo image
*** Keywords ***

Highlight field
    [Arguments]  ${locator}
    Update element style  ${locator}  padding  0.5em
    Highlight  ${locator}

*** Test Cases ***

Take annotated screenshot
    Go to  ${PLONE_URL}/@@site-controlpanel
    Highlight field  css=#formfield-form-widgets-site_logo
    Capture and crop page screenshot
    ...    ${CURDIR}/../_robot/change-logo-in-site-control-panel.png
    ...    css=#content
    ...    css=#formfield-form-widgets-site_logo

3. Changing the HTML¶

To change the HTML of the logo part you can use Diazo to just copy the src and href of the logo elements and put them in your custom HTML in your static HTML Theme. For further information’s about Diazo please have a look at the Diazo documentation in Theming Plone.

Further Information¶

  • There are further How Tos in the Logo section of the Plone documentation dealing with more advanced customization methods.
  • More guidance on TAL and ZPT can be found in the ZPT tutorial.
  • If you want to transfer your changes to the file system in your own theme product, then proceed to the viewlets overview section.
Next Previous

© Copyright 2016. Revision 689fc1f1.

Built with Sphinx using a theme provided by Read the Docs.