Question

I would like to change the link in the Plone logo viewlet. By default it points to the Plone site root, I want to point it to a location that is not within the Plone site.

I tried writing a custom logo viewlet, but this seems very complex for such a small change. What is the best way to do this?

Was it helpful?

Solution

The easiest way to change the Logo link is to override the logo viewlet template. This is best done with z3c.jbot.

You need to add z3c.jbot to your projects custom product, by adding it as a dependency in setup.py, and also set up the configure.zcml correctly:

<include package="z3c.jbot" file="meta.zcml" />

<browser:jbot
    directory="templates" />

Don't forget to make sure you have the browser prefix added in the <zcml> tag.

You can now copy the logo.pt file from plone.app.layout to the templates directory in your custom product. Rename the file to plone.app.layout.viewlets.logo.pt and change:

tal:attributes="href view/navigation_root_url;
                title view/navigation_root_title"

To:

href="http://stackoverflow.com"

Restart the server, and the logo link has now changed.

OTHER TIPS

Alternatively you can edit it via ZMI (/manage) in portal_view_customizations. And search for the "plone.logo" view.

It should open this url in the frame:

/portal_view_customizations/zope.interface.interface-plone.logo/pt_editForm

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top