简体   繁体   中英

How to hide the plone 4.3 site default logo

I need to to know how to replace/hide plone 4.3 default logo using my own viewlet. my viewlets.xml file is under profiles/default and i registered viewlets using generic setup like

<genericsetup:registerProfile
  name="default"
  title="bdr.theme"
  directory="profiles/default"
  description="Installs the bdr.theme package"
  provides="Products.GenericSetup.interfaces.EXTENSION"
  />

But it does not call the viewlets.xml file to hide the default plone site plone logo. What i have to do for achieving my goal. Is it Possible in plone 4.3 or not. I m trying this so long. Any one pls help me.

you can change your logo using py file like first create overrides.zcml in ..plone/product/overrides.zcmlfor replace logo

<browser:viewlet
    name="plone.logo"
    manager="plone.app.layout.viewlets.interfaces.IPortalHeader"
    class=".browser.home.logo"
    permission="zope2.View"
/>

import LogoViewlet class from plone/app/layout/viewlets/common.py inherit that class into your class .redirect any pt file using index .now that pt file contents are replaced plone logo

from plone.app.layout.viewlets.common import LogoViewlet
class logo(LogoViewlet):
  index = ViewPageTemplateFile('templates/logo.pt')

You can do the following:

  1. Install z3c.jbot

  2. Create the logo in a file called plone.app.layout.viewlets.logo.pt and move it to the jbot override directory.

您需要运行配置文件以便应用viewlets.xml。

You hide the logo viewlet by opening @@manage-viewlets . This will show all the viewlets and you can just click the "hide" link.

After that you can export the setup from GenericSetup, and it will give you a viewlets.xml you can use.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM