问题
We are using Plone 4.2 (but problem applies to earlier versions as well).
We have a folder called news containing all our news items, and have a News tab in the navigation to go to the News default . We set the default front page of our site to our News folder, by configuring Zope Management Interface -> Plone site at / -> Properties -> default_page. This works as every time a user first goes to our site or clicks on the Site title at the top of our site, he will see the News default view. However, there is no "Add new" menu at the top of this News default view. When the user clicks on the News tab of navigation, the News default view has the "Add new" menu for user to add new news item to the folder.
Is it possible to make the default front page of the site show the same display as the News tab of the navigation?
Thank you very much in anticipation.
cmgui
回答1:
On siteroot add a contenttype 'Link', enter a title of your choice and set the destination to '/yourSiteId/yourNewsFolderId', make sure it is published, set the Link as default-view of your site.
回答2:
No, this is not possible - at least not with some customizations to code and configurations. "What you see" and "what you can do" is usually tied to particular interfaces or portal_types and making something appear in the same way as within another context is basically not supported of ouf the box.
回答3:
if using dexterity:
when you first get into ZMI click on 'properties' tab and change the 'default page' to the page you want displayed.
this can be a folderish item and will have whatever 'add' permissions you define when creating new content type.
回答4:
if you can't get the "add" options for a content type, you can use TALES conditions to control who can see specific items on your webpage. jsut around what you want to control. one example, which does not show an "add event" link to anon users.
<span tal:condition="not: context/@@plone_portal_state/anonymous">
<a tal:attributes="href string:../createObject?type_name=Event" tal:content="string:add new event"></a>
</span>
来源:https://stackoverflow.com/questions/12126024/plone-default-front-page-does-not-have-add-new-menu