[Dev] automatically hooking into the sidebar

Morgen Sagen morgen at osafoundation.org
Wed Feb 2 12:05:33 PST 2005


There might be a problem when it comes to sharing:  when an 
ItemCollection is fetched from the server, the sharing code would have 
to morph that into a SidebarCollection, and I'm not sure that's the way 
to go.

On Feb 2, 2005, at 11:56 AM, Alec Flett wrote:

> So I've been working on a system for chandler extensions to "plug in" 
> to the sidebar and I'm curious what people think of my scheme. Here's 
> how it works:
>
>    * I added a new Kind, <SidebarCollection> that derives directly from
>      <ItemCollection>
>    * I added a rule to the <ItemCollection
>      itsName="sidebarItemCollection"> - see below....
>
>  <contentModel:ItemCollection itsName="sidebarItemCollection">
>    <_inclusions itemref="content:allItemCollection"/>
>    <_inclusions itemref="content:inItemCollection"/>
>    <_inclusions itemref="content:outItemCollection"/>
>    <_inclusions itemref="content:CalendarView"/>
> /    *<!-- this allows extensions to hook into the sidebar -->
>    <_rule value="for i inevery 
> '//parcels/osaf/framework/blocks/SidebarCollection' where True"/>*
> /  </contentModel:ItemCollection>
>
>    * For ZaoBao, what I was able to do was make its type derive from
>      <SidebarCollection> as follows:
>
>  <Kind itsName="RSSChannel">
>    <superKinds itemref="content:ContentItem"/>
> /*    <superKinds itemref="docSchema:SidebarCollection"/>*/
>   ...
>
> Now, every time ZaoBao makes an RSSChannel, that object is also a 
> SidebarCollection. the RSS Channel need only populate itself as though 
> it were an ItemCollection, and its items will appear in the summary 
> view.
>
> Now I don't know enough about queries to know if this is really a 
> smart way of searching the repository for items that want to hook into 
> the UI... is there a better way than creating a new Kind?
>
> Alec
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> Open Source Applications Foundation "Dev" mailing list
> http://lists.osafoundation.org/mailman/listinfo/dev



More information about the Dev mailing list