[Zope-PTK] CMS comments

Dieter Maurer dieter@handshake.de
Tue, 13 Mar 2001 23:25:47 +0100 (CET)


Tres Seaver writes:
 > Dieter Maurer wrote:
 >  >  * I was often surprised what folder a folder action operated on.
 >  >    All search, submits, publish actions lead to the 'Portal Folder'.
 >  >
 >  >    I implemented an "ActionTitle" for folder actions similar to
 >  >    that for object actions.
 >  >
 >  >    I did not find it easy to get at the folder the actions
 >  >    operate on. Sometimes, folder and object are identical
 >  >    (--> 'Topic'). This should be made easier.
 >  >    I currently use a Python script that determines the folder object
 >  >    via 'restrictedTraverse' from the action url.
 > 
 > Can you post a sample of how you are using this script?  I
 > don't doubt that the folder actions get confusing, but I am
 > not quite sure which behavior you refer to.
action_box.dtml:
....
<dtml-if folder_actions>
 <tr class="&dtml-AuthClass;">
  <td class="ActionTitle">
   <dtml-let obj="portal_getObjectFromActionUrl(folder_actions[0]['url'])"
             icon="_.getattr(obj, 'icon', '')"
             typ="_.getattr(obj, 'Type', '')"
             objID="obj.id"
   >
     <dtml-if icon>
     <img src="&dtml-BASEPATH1;/&dtml-icon;" align="left" alt="&dtml-typ;" />
     </dtml-if>
     &dtml-objID;
    </dtml-let>
  </td>
 </tr>
 <tr class="&dtml-AuthClass;">
  <td> <dtml-in folder_actions mapping>
        <a href="&dtml-url;"><dtml-var name></a><br>
       </dtml-in>
  </td>
 </tr>
</dtml-if>
....


 >  >  * The 'Above in Thread' display in discussions is ugly:
 >  >
 >  >     The discussion ancestors of a discussion item
 >  >     are formated as a ':' separated list. This is unwieldy
 >  >     for deep discussions.
 > 
 > Can you suggest a replacement for the skin method which produces
 > this display?  The existing method is in
 > 'portal_skins/generic/discussion_reply_view'.
It is not that interesting for me that I would do it in the near
future.


Dieter