Raphael Ritz wrote:
Wichert Akkerman wrote:

[..]

If you draw this up you basically get a matrix of views with a
content-type axis and a tile-type axes. Something like:

        | main content  |  portlet          | search result   | folderlisting
 -------+---------------+-------------------+-----------------+----------------
 Topic  | topic_view.pt | topic_portlet.pt  | topic_list.pt   | topic_list.pt
 Page   | page_view.pt  | page_portlet.pt   | page_summary.pt | page_list.pt
 Link   | redirect.pt   | link_portlet.pt   | link_list.pt    | link_list.pt

you could register them like this:

  <plone:tile
      template="page_view.pt"
      for=".interfaces.IDocument"
      name="portlet"
      />

and you could use them like this:

  <tal:tile replace="python:tile(obj, style='list')">
    ..
  </tal:tile>

is that something along the lines you had in mind? are you planning on turning that into a plip? 3.1 material? certainly, the Zope CA seems to lend itself for expressing such scenarios (i.e. adapting a content object to a certain teaser type/ teaser interface, which then gets picked up by certain viewlet/portlet managers etc.)
I think this is too much of a change for 3.x. However it is a direction
that I think is worth investigating for 4.0. I'm not sure if I will have
time to work on it though.


I'm very much in favor of this approach but I agree that
this is not for the Plone 3 series.

Furthermore, I'm not sure that the underlying infrastructure
should be dealt with in Plone. There could be interest to
support this at the CMF level even (by enhancing the
types tool maybe? providing a registry for tile types?
just thinking out loud ...)

In the spirit of thinking aloud, I think even that is not general enough. I think the easiest approach will be to use "pure" Zope 3 and register these as different views providing different marker interfaces or something like that. That way, you can tile something that doesn't have an FTI, or use different tiles for different variations (think subtyping).

Anyway, let's take this to the plone-dev list and talk to Malthe, who I believe has got code for some of this.

Martin

--
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book


_______________________________________________
Framework-Team mailing list
Framework-Team@lists.plone.org
http://lists.plone.org/mailman/listinfo/framework-team

Reply via email to