[***SPAM*** Score/Req: 04.00/04.00] Re: [Zope] Catalog aware
Lennart Regebro
regebro at gmail.com
Fri Jul 21 13:38:51 EDT 2006
On 7/20/06, Garito <garito at sistes.net> wrote:
> Ok, a real case:
>
> I'm working on a data system (I like the concept data system) for a friend
> He is Dj for that I want to create a concept like
>
> Session
> Form -> A formulator
> See -> Used to view the session on its default view
> Ask -> Used to view the session to change it data (to modify the object)
> Edit -> Used to change the properties (via Ask view)
> ...
>
> Ask will be something like
>
> <tal:b tal:repeat='field Form/get_fields'>
> <label tal:attributes='for field/getId' />
> <tal:b tal:replace='structure field/render' />
> </tal:b>
>
> As you can see a lot of entities will use the same Ask
Sure.
> I will create a container to store all these kind of functionality to
> use is as a generic Ask
> In a normal way I can use adquisition to make these way but I want to
> store things with some kind of order then I define something like
>
> MyFriendsWeb (this is an entity)
> Forms (is not an entity but I use the same product to create it)
> Session -> Formulator
> Production -> Formulator
> Functionality (is not an entity but I use the same product to create it)
> Ask
> See
> Edit
> Session (this is an entity)
> Form -> points to MyFriendsWeb/Forms/Session
> See -> Will use the generic one
> Ask -> this one too (the generic one)
> ...
> Production (this is an entity)
> Form -> points to MyFriendsWeb/Forms/Production
> See -> Will use the generic one
> Ask -> this one too (the generic one)
>
> MyFriendsWeb is an entity for that reason catalog everything that not in
> another entity like Session
>
> Session is another entity for that catalog See (the pointer one not the
> real See), Ask (like See is a pointer) and so on
>
> What I want is semantic structure not only usefull structure that makes
> that every entity will know everything it can do or be
I think I see.
> With my model I use my product for every container, formulators/page
> templates/script pythons like functionality an so on
Sure, just like portal_skins does.
> My model works but I would like if its possible to use something like
>
> <tal:b tal:replace='structure Session/Form/header' />
>
> or
>
> <tal:b tal:replace='MyFriendsWeb/Sessions' />
>
> instead of
>
> <tal:b tal:define='Form <some code to retrieve the form. First if here
> has Form, then in the acquisition context and finally searching on the
> catalog of the entity>'>
> <tal:replace='structure Form/header' />
> </tal:b>
>
> It works, its only a question of use it as simple as I can
Well, this seems complex. Can't you just have
context/Session/Form/header instead of just Session/Form/header?
> For that my product is a ZCatalog with a property Entity (boolean)
> If you mark Entity as true for an object every objects below these one
> are catalogued by my product
Uhhh. That doesn't help.
> What do you think?
Sound fine. I notice that in all of your description above there is a
complete lack of indexed page templates. ;)
--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
More information about the Zope
mailing list