Questions tagged [dexterity]

Dexterity is a content type framework for CMF applications, with particular emphasis on Plone. It can be viewed as an alternative to Archetypes that is more light-weight and modular

Dexterity is a system for building content types, both through-the-web and as filesystem code. It is aimed at Plone, although this package should work with plain Zope + CMF systems.

Dexterity is included by default in Plone 4.3 as an alternative to Archetypes and will be the main content type framework in upcoming Plone 5.0.

282 questions
5
votes
2 answers

How to resize a Dexterity image widget?

I'm using a DisplayForm for my view class and succeeded rendering a NamedBlobImage field with: How can I tweak that ZPT to display a different image size like 'image_mini' or any other from…
Davi Lima
  • 800
  • 1
  • 6
  • 20
5
votes
2 answers

How do you override the default value of a field in a dexterity behavior in Plone?

We have a requirement for a dexterity content type to have exclude from navigation behaviour but for the exclude_from_nav field's default value to be True. In the behaviour plone.app.dexterity.behaviors.exclfromnav.IExcludeFromNavigation it…
scarba05
  • 2,943
  • 1
  • 27
  • 29
5
votes
2 answers

How I order behavior IDublinCore in Dexterity Type?

I'm writing a product using Python Dexterity Type, and I have Title and Description, this fields come from a behavior plone.app.dexterity.behaviors.metadata.IDublinCore, but I neeed reorder this fields with my fields. Example: My fields: document,…
Juliano Araújo
  • 3,548
  • 1
  • 11
  • 16
5
votes
2 answers

How to hide a fieldset (tab) in Plone add/edit form

I have some code in dexterity content type, as below: form.fieldset( 'transitionsLog', label=_(u"Transitions Log"), fields=['t_log'] ) form.mode(t_log='hidden') t_log = schema.TextLine( title=_(u'Transitions log'), ) In add/edit…
Andy
  • 213
  • 1
  • 9
5
votes
1 answer

Allow Anonymous users to add Dexterity objects

I have a Dexterity-based container that holds inside a Dexterity-based item. I need to let Anonymous users to add objects of this type inside the container. I already created a rolemap.xml file with the following:
hvelarde
  • 2,875
  • 14
  • 34
5
votes
1 answer

Setting field defaults on programmatically created Dexterity items

I have a Dexterity content type based on plone.directives.form.Schema which has a number of form hints for assigning defaults: @form.default_value(field=ITrial['start_on']) def default_start_on(data): return datetime.now() Some of the defaults…
Matthew Trevor
  • 14,354
  • 6
  • 37
  • 50
4
votes
3 answers

Preventing users to upload BMP, TIFF etc. images to ImageField in Plone

The users do it because they can. However, image auto-resize etc. breaks down. This make me a sad boy. How to limit image uploads to GIF, PNG and JPEG sitewide? For Archetypes For Dexterity
Mikko Ohtamaa
  • 82,057
  • 50
  • 264
  • 435
4
votes
1 answer

Moving fields between fieldsets on Dexterity

In Archetypes, in order to move a field from a fieldset (or schemata) to another, we can do the following: schema['creators'].schemata = 'default' However, I'm not achieving the same using Dexterity. I've tried using form hints.…
Thiago Curvelo
  • 3,711
  • 1
  • 22
  • 38
4
votes
1 answer

Custom AddForm template with Dexterity, on Plone 4

I'm having problems in getting my Dexterity content type to show a custom Add Form. I have already done this in a previous product, but, amazingly, I cannot accomplish this using Plone 4.1 and plone.app.dexterity 1.0.3 My CrmContact content type,…
Rigel Di Scala
  • 3,150
  • 2
  • 17
  • 23
4
votes
2 answers

How light weighted Dexterity-base contenttype can be

I'm trying to write a light weight content type that work similar to Facebook's post. The whole content schema is just a text field. There's no title, description. It must be Contentish and is managed by CMFCore: It must have an FTI, a portaltype…
quyetnd
  • 589
  • 3
  • 8
4
votes
2 answers

Custom SearchableText and HTML fields in Plone

I am writing a Dexterity content type which contains plain text and HTML fields. I want to have a custom SearchableText() method which exposes these fields to portal_catalog and Plone full text search. I assume for plain text I can just do string…
Mikko Ohtamaa
  • 82,057
  • 50
  • 264
  • 435
4
votes
1 answer

Plone:Folderish content type generated with Dexterity. How do I populate it's file, image and rich text fields?

I have made some new content type using Dexterity. I now wish to create the content from a python script. All is well with the line below, and the item is generated in the target folder with the correct id and date. But how do you pass the file data…
Horst
  • 41
  • 1
4
votes
5 answers

Reverse the Plone default sort order in folder_contents

How can i make my folderish custom type display it's object listing in reverse chronological order in folder_contents view? Default is oldest object at the top of the list, I would like a new object just added to be at the top of the list. Would be…
Aaron Williams
  • 655
  • 4
  • 11
4
votes
1 answer

Moving existing fields/behaviors in dexterity

How can move an existing field (IDublinCore.rights) into another fieldset, after a specific field - Without writing my own Behavior (a copy of IDublinCore)? "Rights" fields should be appear after "image_caption" (own contenttype) This isn't working …
user966660
  • 634
  • 1
  • 8
  • 20
4
votes
0 answers

Plone 4.3.4 - ImportError: No module named dexterity.localcommands.dexterity

On a vanilla Plone 4.3.4 site (Unified Installer on Ubuntu 14.04.1LTS), and after updating buildout.cfg with the zopeskel and paster boiler plate stuff and running buildout, I successfully created a dexterity package in my src folder: $ cd src $…
Eric R.
  • 81
  • 3
1
2
3
18 19