maik (dot) jablonski (at) gmail (dot) com
Abracadabra Object - pre-configured objects with only one click
The "Abracadabra Object"-Product allows you to add pre-configured ZOPE-objects to your folders through the Zope-Management-Interface with only one click and run scripts on them. This is extremely useful if you use the Zope-Management-Interface as a content-management-system or to build a graphical user interface (GUI) for developing / prototyping database applications with Zope. Please note: Download and install the PropertyTools. AbracadabraObject & PropertyTools allow you to develop comfortable database applications in just a few minutes.
For example: You can set up a default DTML Document with your own default text and additional properties. Or you can set up a default Folder with properties and several objects already in it. Or you can create a simple FAQ-Object: Create a PropertyObject with additional properties as question, answer and so on. Then add a little script, which adds the date of creation in a property of the FAQ-object. If you now add a new FAQ-Object through the Abracadabra Object, you get a already configured document with additional properties and a correct datestamp.
In short terms: When you add an Abracadabra Object from your 'Select object'- list, you can select one of your default objects from a list and it will be copied with a given id and title into your current folder automagically. After the cloning you can run a PythonScript on your fresh cloned object. This is useful if you want to catalog, cache, mail etc. objects or store computed properties [e.g. dates] after the creation of an object.
AbracadabraObject even generates auto_ids in different flavors for your objects if you want to.
How does Abracadabra Object work?
Abracadabra Object works with all cloneable ZOPE-objects. Abracadabra Object
searches for a folder with the id
Enter the id and title of the new object to add... and that's it!!!
Abracadabra Object simply clones the selected object from the
If you want to hide some objects from being listed in the AbracadabraObjectBox, you can also set a lines-property with name=ignore_ids and enter all object-ids you don't want to be shown. This is mainly useful if you want to place a ZCatalog into the standard_object_folder to prevent cataloging your Abracadabra-Objects into your site-catalog.
After having cloned the specified object, Abracadabra Object looks for a
method/script in the
Let's go... Create a folder with the id
If you want to create AbracadabraObjects through scripts, you can use the
global method manage_addAObject(id, object_id, title=''). Simply call it from
a PythonScript with context.manage_addAObject(
Is there a patch for the Zope-Management-Interface for still more comfort with Abracadbra Object?
Abracadabra Object patches the Zope-Management-Interface (ZMI), so you can add Abracadabra Objects really fast through a special Abracadabra-Object-Widget. You should try this feature with a "clean" Zope to get the look&feel of this cool feature (means: try it with a fresh Zope with no additional products installed).
Please note: Several products (e.g. ExternalEditor, QuickLinks), try to patch the ZMI. If you have problems with one of them, try to mix the different '(manage)-main.dtml'-files in order to get correct results. Adding a AbracadabraObject-Box to your customized main-template is very simple. See dtml/main.dtml on how to do this properly. The product in alphabetical last position will win the Monkey-Patch-Race, so AbracadabraObject is kind of handicaped by default in this race.
If you want to give users only the view of the Abracadbra-Object-box [and not the regular "Select-Type-to-Add-Box"], click off the right "Abracadabra Object: Show StandardSelectBox".
Please send all bugs or feature-requests regarding AbracadabraObject to firstname.lastname@example.org.
- Some fixes to monkey-patched 'main.dtml' to be in line
with latest Zope-versions.
- Language cleanups. Thanks to Tom Snell!
- fixed bug: auto_id as list were broken for current Zopes (>=2.6.4),
because line-properties changed from lists to tuples...
- added coding to CharacterMapping.py; Thanks to Yannick Dirou!
- Updated patch for main.dtml to Zope 2.7.
- New features
Added manage_addAObject(...) as global wrapper for
Hope this will make it easier to create AbracadabraObjects
through scripts... for me it does.
All ids given to AbracadabraObject will be transformed
into valid Zope-Ids (independent of auto_id-feature).
Now you can even trust your Windows-Special-Characters-Must-
You can now specify the auto_id when calling the factory
If you set a lines-property with name=ignore_ids, you can hide
objects from being listed in the AbracadabraObjectBox. Mainly
useful if you want to place a ZCatalog into the standard_object_folder
to catch cataloging your Abracadabra-Objects into your
- Policy changes
You cannot execute single scripts (ending
on underscore) with no corresponding AbracadabraObject
due to security reasons anymore.
You can only call PythonScripts as post-processors on objects
due to security reasons. Please call your DTML-Methods etc.
through a PythonScript.
- UI changes
Removed "Add and Edit" and "Add and Edit Properties"-Buttons
to keep the widget smaller.
Moved descriptions (id, title) into input-boxes to make
the widget smaller.
Made the first entry in select-list selected by default, so
IE-Users should have the same look&feel as Mozilla-Users.
- Bug fixes
Made some fixes for catching errors for empty
standard_object_folder or empty object_id.
Fixed acquisition bug for script-execution.
- Things removed
Removed ZZZMonkeyPatch. AbracadabraObject patches now
the manage_main directly with a slightly modified
Zope 2.6.2-template (only two minor changes).
Removed demo.zexp. It was a little bit outdated because
it didn't used PropertyObject/Folder to show the real
power of AbracadabraObject.