Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set the title of a browser page in Plone

Tags:

plone

I'm trying to find how I can set the title of a browser:page. The main goal is to have it in the drop down "display" menu on my content type.

I have take a look in the code of CMFDynamicViewFTI. The only example there use browser:view and I don't know what it is, I have never seen browser:view. Is this the solution ? Does browser:view support customerize (The browser:view directive doesn't support the template parameter in zcml).

So is there anyway to set the title (as listed in the "display" menu) of a browser:page?

like image 217
toutpt Avatar asked Jun 07 '11 13:06

toutpt


1 Answers

A browser:page is essentially just a browser:view directive with added support for templates. You can set a title using the zcml directive, just as you can for browser:view.

To set a title for the display menu, add the menu and title attributes to the browser:page directive:

menu="plone_displayviews"
title="title goes here"

You may also need to explicitly include the ZCML for plone.app.contentmenu first to make sure that the plone_displayviews menu is defined:

<include package="plone.app.contentmenu" />
like image 111
Laurence Rowe Avatar answered Sep 22 '22 09:09

Laurence Rowe