Personal tools
You are here: Home Products Plone Roadmap #39: XML-based installation of actions and properties
Document Actions

#39: XML-based installation of actions and properties

Contents
  1. Motivation
  2. Proposal
  3. Implementation
by Alexander Limi last modified June 11, 2006 - 00:21
Proposed by
batlogg
Proposal type
State
rejected

Motivation

  • I don't longer want write the same stuff every time again if i want to install an action or a proeprty.
  • Makes Produkt creation easier

Proposal

Make installation of actions and properties easier. Make them installable over xml definition.

Create two files in the Extension Directory of your Product. One called actions and the other properties.

The first,actions, fill in this way:


  name=Testaction
  id=testaction
  action=string:test_form
  condition=member
  permission=View
  category=folder
  visible=1

name=Testaction2 id=testaction2 action=string:test_form2 condition= permission=ModifyPortalContent category=user visible=0

These two actions are examples. The xml tag provides the name where you want to install your action.

The rest are the id value pair you normaly fill in in zmi or you give to the addAction method from the tool you want to install your action. Don't change the varnames bevor the = these are the parameter names you give to addAction. The Rest edit in the same way as if you put a new action to a action provider from zmi.

The second,properties,fill in this way.


  propertyname=propertyvalue=type
  propertyname=propertyvalue1,propertyvalue2,propertyvalue3=list
  propertyname=1=boolean

propertyname=1=boolean propertyname=propertyvalue=type propertyname=propertyvalue1,propertyvalue2,propertyvalue3=list propertyname=1=boolean propertyname=propertyvalue1,propertyvalue2,propertyvalue3=list

Its the same as making actions over xml the diffrent is that you have to think about is what doc you need for properties. You need an property id, a property value, and you have to define the type and seperate these three parts with a = like above. Don't care about using = in the value part i thought on that. The type name has be the same as the tipe name in zmi if you add there a property. If you want install a propertie on portalObject use the portal_url tool in tag

Implementation

- At this time put it only in your Product directory in future it should be a part of quickinstaller

- improve this code to make the whole product configuration in xml like zope.conf.

- Deprecate install.py in this way


For any issues with the web site functionality, please file a ticket.

Please consult the policy on plone.org content if you want your content published on this site.

Servers and hosting by