plone

Add class to body tag using diazo with notheme

余生长醉 提交于 2020-01-14 14:59:11
问题 i'm displaying the content of a document in an overlay using plone/document?ajax_load=True&ajax_include_head=True as the src for an iframe. in development mode appending &diazo.off=1 did the trick. on the production server this sadly does not work, so i added the ajax_load parameter as suggested in the documentation of plone.app.theming i wrapped all my directives in a <rules if-not="$ajax_load"> element to make sure they are not applied (see code below) now i'd need to mark the body of the

How to override template “folder_full_view_item.pt” only for a Custom Type?

百般思念 提交于 2020-01-13 14:55:33
问题 This question has evolved in a confusing way. Some of its parts though, and specially some answers, might be useful for someone. Therefore I'll let this question unmodified and I'll try to reformulate the question here. Overriding the template folder_full_view_item.pt with z3c.jbot will override the template for all Content Types. How do I override it only for a single Content Type MyType in a Product with many types? Having the following structure: Folder (layout=folder_full_view) Document

How can I remove portlets in edit mode with Plone 4?

£可爱£侵袭症+ 提交于 2020-01-11 09:25:31
问题 I'm used to achieve this under Plone 3 by override base_edit.cpt file under portal_skin and make columns empty: <metal:head fill-slot="column_one_slot"></metal:head> <metal:head fill-slot="column_two_slot"></metal:head> I have tried to achieve this with Plone4 and the result is quite weird: I have two empty columns and the edit mode doesn't stretch (stay in the middle of the page). 回答1: In Plone 4 you can disable the columns by setting a couple variables on the request: <metal:override fill

Print / Fullscreen / Email icons

喜你入骨 提交于 2020-01-11 08:42:59
问题 In Plone 2, there were icons for print, fullscreen and email in object views. How do I enable these in Plone 4? They don't seem to be present in a default installation of Plone 4.1, but I must be missing something, and I'd like to know what? Thanks 回答1: IIRC, document actions can be re-enabled in Plone 4 in the ZMI interface for the actions tool: http://plone.293351.n2.nabble.com/document-actions-in-plone-4-td5788892.html Go to ./manage_main for your Plone site. Click on portal_actions Click

How can I add translations to a Plone site front-page

狂风中的少年 提交于 2020-01-06 20:12:36
问题 I'm using LinguaPlone in a site thas is written in English and Spanish. All site pages and folders can be translated, except the front page folder. I think that I can translate the page that the front page folder uses as view, but in that case when a user goes to front page, only the folder view is showed (not its translation). I'm using Plone 4.1.4 and LinguaPlone 4.1.2. Maybe I need to try with other tool, as raptus.multilingualplone. 回答1: Normally, when setting up a LinguaPlone site you

Fail to run buildout to upgrade plone from 4.2.4 to 4.3

跟風遠走 提交于 2020-01-06 04:14:06
问题 Debian 6. After modified extents and commented out all in [version] in buildout.cfg, "buildout -vvv" shows: Installing 'buildout.dumppickedversions'. We have the distribution that satisfies 'buildout.dumppickedversions==0.5'. Installing 'plone.recipe.zeoserver'. We have the distribution that satisfies 'plone.recipe.zeoserver==1.2.6'. Getting required 'ZopeUndo==2.12.0' We have the distribution that satisfies 'ZopeUndo==2.12.0'. Getting required 'ZODB3==3.10.5' We have the distribution that

How to define DB-location in a Plone-4.1-Unified-Zeo-Install?

北慕城南 提交于 2020-01-05 08:35:08
问题 In Plone's 4.3.1-Unified-Installer's base.cfg (ZEO) I can see, it is possible to define the ZODB-location as a variable, in Plone-4.1.6-Unfied-Installer's base.cfg, not. Before I start investigating further: Is is it possible to mimicry this in 4.1 by simply adjusting the config, or does this option depend on higher core-package-versions? 回答1: Yes, you should be able to do it by adjusting the 4.1.x config. The 4.3.x feature was just an enhancement of the installer; the ability to do it has

If a user doesn't have permission to render a View (configured on configure.zcml), how do I raise Forbidden instead of redirecting to login_form?

亡梦爱人 提交于 2020-01-05 07:25:48
问题 I have a browser view, with some utilities. Is mainly an "utility view" that I traverse using old-style pt templates (that are inside skins folder). My browser/configure.zcml : <browser:page for="*" name="my_view" class=".myview.MyView" allowed_interface=".myview.IMyView" permission="my.permission" /> As you can see, it has a custom permission: this is needed because anonymous users can't render this view and this permission is really specific to a certain situation in my portal. I thought: I

zope_i18n_compile_mo_files doesn't work on a Zeo configuration

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-04 14:16:11
问题 I'm in trouble with the "local translation" override by buildout configuration. I would like to override some standard labels of plone using the extra conf parameter "zope_i18n_compile_mo_files" with a folder placed in the buildout's directory (plone 4.3) : "locales/it/LC_MESSAGES/plone.po" In another Plone 4.1 installation it works well. The only difference between these installations are the plone version (4.1 vs 4.3) and the architecture (stand alone vs zeo cluster). This is the piece of

My Archetypes-based content type can't be added

末鹿安然 提交于 2020-01-04 12:14:44
问题 I'm developing an add-on package which introduces a few Archetypes-based content types; these are defined in the default profile of that package. After (re-) installing my package in the Quick-Installer, I can see my types in the types tool; but I can't add them TTW, and they are not listed in the folder_constraintypes_form. I did select them in the "Allowed content types" multiselect list of the Folder portal type. Since I got a ValueError from FactoryTypeInformation._getFactoryMethod in an