Adding ATTopic to ArguUML/ArchGenXML product.
Bill Campbell
bill at celestial.com
Tue Dec 4 07:19:43 UTC 2007
On Mon, Dec 03, 2007, Larry Pitcher wrote:
>Bill Campbell wrote:
>>I've run into a wall trying to add ATTopic (aka Smart Folder or
>>Composition) to a Plone 2.5.3 product I'm building, largely as an exercise
>>to get more familiar with the process.
>>
>>I've added a <<stub>> class, ATTopic, and have it as an aggregation under a
>>class. It appears in the allowed_content_types as I would expect, but
>>doesn't appear under ``add item''.
>>
>>I tried adding an ``include_from'' tagged item, but that didn't work. I
>>also tried adding an explict include.*from in the code-section module-
>>header in the config.py file and in the class file itself, but so far I
>>haven't found anything that works. The statement is:
>>
>>>from Products.ATContentTypes.content.topic import ATTopic
>>
>>Running this in foreground doesn't show any errors.
>>
>> python-2.4.4
>> zope-2.9.7
>> plone-2.5.3
>> ArgoUML-0.24
>> ArchGenXML-1.5.2
>>
>>Bill
>>--
>
>Bill,
>
>Try calling your <<stub>> class "Topic" or "Collection". I haven't used
>this one myself, but AGX seems to like the content type's "Title"
>instead of its "id". In portal_types the type is called
>"Topic(Collection)" so I'm not sure which one is going to work for you.
>Just give it a try...
Looking at the generated source, it appears to be fine as the class's
allowed_content_types includes 'ATTopic' as the last entry:
##code-section module-header #fill in your manual code here
from Products.ATContentTypes.content.topic import ATTopic
##/code-section module-header
...
class ...
...
allowed_content_types = ['CSFileBox', 'CSRequest', 'ATTopic']
filter_content_types = 1
...
The first two allowed_content_types are defined in my product and work
properly.
Bill
--
INTERNET: bill at celestial.com Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way
FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676
Fix reason firmly in her seat and call to her tribunal every fact,
every opinion. Question with boldness even the existence of a God;
because, if there is one, he must more approve of the homage of
reason, than that of blindfolded fear. --Thomas Jefferson
More information about the Product-Developers
mailing list