问题
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.
回答1:
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')
回答2:
You can do the following:
Install z3c.jbot
Create the logo in a file called plone.app.layout.viewlets.logo.pt and move it to the jbot override directory.
回答3:
You need to run run the profile in order for the viewlets.xml to apply.
回答4:
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.
来源:https://stackoverflow.com/questions/17694122/how-to-hide-the-plone-4-3-site-default-logo