[Zope-CMF] Compound elements status

Thomas Olsen thomas@mmmanager.org
Tue, 19 Mar 2002 00:50:47 +0100


On Tuesday 19 March 2002 00:15, seb bacon wrote:
> When you display a page with its 'view' action, you want to display each
> of its components according to their 'view' action.  How about if you
> have a 'view comments' action for a page, which puts some copy at the
> top regarding comment threads, and then displays each component with its
> thread beneath.  Then you need a way to map between the container's
> action and those of its components.  This can only be done in a 'slot'
> type definition.

Hmm - I dont think the ability to comment each element is something I would 
desire - I'd rather have comments on the article itself -  but I cannot see 
why it shouldn't be possible to implement in CMFArticle if wanted.

> Also, if you have slots with named components, you get to define the
> layout of the page accurately ('image_1 goes here, text_3 goes there'),
> which it is hard to do when the components are looped over in a repeat
> clause.  Of course you could extend the interface with CMFArticle to
> allow you to name elements; however, the user would then need access to
> the page layout source too.

IMHO the user shouldn't need to touch the layout source to place the article 
elements. But you are right that a sequencial loop places some limitations on 
how you can layout the page. This is always the case when you want to 
generate dynamic content. You have to compromize between total control over 
the layoyt and being generic enough to make the content dynamic. CMFArticle 
uses css to place the elements on the page and you can actually design pretty 
impressive layouts just by selecting how you want to float your elements. The 
controls for doing it (the "More..." popups) isn't quite intuitive enough yet 
though - time y'know :-)

> A separate design consideration is that it would be nice to be able to
> recursively compose components.  What I mean by this is the following:
> suppose you have a type which has two fixed slots, "image" and "text".
> These are displayed in the default action with the text on the left and
> image on the right.  Wouldn't it be nice to be able to add these two
> elements as a single "textandimage" component to another template?

Personally I prefer to be able to add and image and some text, and then 
another image - and a table - and some text etc. he he.

But I can see the value in being able to create site specific "Article 
templates".

> Another consideration is that it would be nice to be able to use any
> existing Types as components without having to tinker with their source
> code: it should be possible to create new 'articles' (I call them
> 'templates') through the web.

That would be really cool! If you mean create new element types for the 
articles - or templates :-) Or do you mean the fixed element templates 
mentioned above?

> >>The type itself should act as a single unit
> >>in workflow and searches, so that a search for a page does not bring up
> >>the components of which it is constructed, but the page itself.
> >
> > I haven't tested it very much but CMFArticle should work like that except
> > for subarticles which appears like chapters and are catalogued
> > separately.
>
> Yes, my bad.
> I'm **really** snowed under with work at the moment so I haven't time to do
> any releasing of my code for you to look at yet.  Sorry!  Hopefully my
> thoughts are useful in the meantime.

Absolutely - and I'm really looking forward to seeing your code. It's obvious 
that you have some ideas I haven't thought of when designing CMFArticle.

>
> seb

-- 
Regards,
    Thomas Olsen

http://www.mmmanager.org