plone

How to link an URL inside the them from the Diazo rules file?

大兔子大兔子 提交于 2019-12-13 02:15:39
问题 If an URL to a image is set in a HTML template, then the URL is updated to reference files inside the theme folder. For example, <img src="image.png" /> is replaced by: <img src="http://localhost:8080/mysite/++theme++mytheme-theme/image.png" /> However, if I write following Diazo rule: <replace css:content="#some-class"> <div id="#some-class"><img src="image.png" /></div> </replace> the URL of the image is not update. How can I write Diazo rules where the image gets correctly referred. I want

Is there any reason I shouldn't make pages folderish

拜拜、爱过 提交于 2019-12-13 02:05:05
问题 I find the hardest thing to explain to Plone end users is the concept of having to make a folder, a page and set the folder's default view to a page in order to have nested pages. Is there any reason I shouldn't include a folderish version of a page content type in my product? 回答1: there are existing products that provide folderish types that almost behave like pages for the end-user eg. Products.Richdocument and raptus.article. personally i prefere raptus.article because of it's concept of

ComponentLookupError: (<InterfaceClass zc.relation.interfaces.ICatalog>, '') with Dexterity references

旧城冷巷雨未停 提交于 2019-12-12 18:12:25
问题 The following is a snippet from a dexterity content type which I'm working on. There are two content types, Programmes and Projects. It should be possible to associate a Project with a Programme (I've defined that below as a RelationChoice). from five import grok from plone.directives import dexterity, form from zope import schema from zope.schema.interfaces import IContextSourceBinder from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm from zope.interface import invariant,

Plone/z3c.form 3.2.1- How can I make an autocomplete widget (that is not a required field) use a custom binded source object?

血红的双手。 提交于 2019-12-12 17:26:07
问题 I'm trying to get an autocomplete widget to render in a form (z3c.form), using a binded source object. In the interface class: Parent = schema.Choice(title=u'A Parent', source=ParentSourceBinder(), required=False, default=None) In my form.Form class: fields['Parent'].widgetFactory = AutocompleteFieldWidget I'm using a custom source binder because I need to pull data from a database. class ParentSource(object): implements(IQuerySource) vocabulary = SimpleVocabulary([]) session = None __iter__

Plone Workflow: How to check for multiple attributes of an object?

陌路散爱 提交于 2019-12-12 17:25:56
问题 In our project we would like to have a workflow which checks whether all three signatures (implemented through booleans) have been added to an object of type "Project" before it continues to the next state. Unfortunately this doesn't seem to be possible while editing the workflow through the web and we haven't been able to find it in the documentation either. How would we do it? Thank you very much for any assistance. 回答1: Use the transition Guard expression to check for this: python: here

Plone workflow: Publish an object, and all used/referred objects as well

馋奶兔 提交于 2019-12-12 15:43:32
问题 I have a Plone site with Archetypes objects which refer to other objects (by UID). When, say, a news object is published, all image objects which are referred in the text attribute, should automatically be published, too. There are three different kinds of publication - "for all" (visible for anyone), "visible" (for authenticated users), and "restricted" (for members of certain groups). Which one of these is chosen (in the first place) is determined from the type of the objects. The user only

Custom font doesn't work in IE8 in Zope/Plone

☆樱花仙子☆ 提交于 2019-12-12 15:14:23
问题 I'm making a Web Portal using Zope/Plone4 CMS. Well, I used @font-face to declare the typography for headings. The code and font are from Font-squirrel. I made the website in local machine (without install the font in my PC) and everything works fine. But in Plone, IE8 doesn't render the font at all. ONLY IE8, when IE7 and IE9 renders perfectly (?) I made a test using Google Fonts. Everything works fine, all browsers. I think it's possible that the error come from read/write permissions or

Customizing search results template in Plone 4.3

坚强是说给别人听的谎言 提交于 2019-12-12 14:53:03
问题 I'm trying to make just basic structural changes to the search.pt template (under portal_view_customizations — plone.app.search/search.pt ). I load this up from portal_view_customizations, hit "customize" at the bottom, and make any sort of changes*. If I do a search on the page after altering the template, it prompts for a username and password. I'm not getting any errors and can't quite figure out what might be the issue. Is there some workflow or publishing process I'm missing for within

LXML failed to install on Plone 4.3 64-bit (MS Windows)

[亡魂溺海] 提交于 2019-12-12 14:26:53
问题 Been asked to update my answer in correct format - Question then Answer. running build_py creating build creating build\lib.win-amd64-2.7 creating build\lib.win-amd64-2.7\lxml copying src\lxml\builder.py -> build\lib.win-amd64-2.7\lxml then generates running build_ext building 'lxml.etree' extension **error: Setup script exited with error: Unable to find vcvarsall.bat** An error occurred when trying to install lxml 2.3.6. Look above this message for any errors that were output by easy_install

Plone bin/instance start and bin/instance restart fail sometimes

[亡魂溺海] 提交于 2019-12-12 14:26:23
问题 Sometimes it looks like bin/instance start fails for a Plone site. Symptoms The site has been running for a while without maintenance One runs buildout: bin/buildout One tries to restart the site using bin/instance start or bin/instance restart The site doesn't start. Nothing is logged to console. However, if you run bin/instance fg first the site does start This affects both Plone 3.x and Plone 4.x sites. Below is a sample how the process goes. You can see that the site doesn't really start