[Zope3-dev] [DRAFT] local portlets and perspectives

Jean-Marc Orliaguet jmo at ita.chalmers.se
Fri Aug 26 17:53:25 EDT 2005


Jim Fulton wrote:

> Jean-Marc Orliaguet wrote:
>
>>
>>
>> in that case, using a portlet to display the poll results might not be
>> the best solution,
>
>
> Right, but then what if, when displaying the poll results, I wanted to
> use some
> other portlet.  Perhaps I have a portlet that lists the top 10 polls
> and I want to display that within the content well (inside the
> o wrap) when I display my results.
>
If it's just a matter of visual layout, you only need to add a slot
inside your theme just below or above the main-macroslot where you can
put the poll portlet (main top, and main bottom slot) as you'd find in
any zpt-based template.

not everything needs to be placed in the main O

> Limiting portlets to master pages (o wrap) seems to me to be a needless
> and complicating limitation.
>
> ...
>
>> then the actual question is:  why should a page in a zope3 application
>> only display one view of an object at a time? i.e. the main view? when I
>> read my mail I have 4 different views of my mailbox, not just the text
>> contained in the mail ...
>
>
> Exactly. So, perhaps I have a mailbox.  The main view for the mailbox
> uses 3 portlets:
>
>   - a mailbox listing portlet
>
>   - a portlet that lists all my mailboxes
>
>   - a portlet that displays a selected message
>
> Why can't I specify these three portlets in the definition of my
> mailbox view?  Why should I have to tease them into the master page?
>
> I'd like to be able to design my individual application pages
> and the master page independently.  If I can only display portlets
> in master pages, then either:
>
> 1. I can't use them when designing individual application pages, or
>
> 2. I have to sneak the contents of my applications into the master pages,
>    which seems to be a far more complicated model, conceptually, let
> alone
>    computationally.
>
> Jim
>
all you need to know when you design your application is the name of the
slot in which the portlet will be displayed (right slot, left slot,
etc.) This was already the case CMF's main_template.pt where slot names
where hardcoded.

then in a zcml declaration of the perspective you can specify the slot
in which the portlet will be displayed.

in some way you'll have to tell *where* the portlets will be located on
the page, this is what you do with the "fill-slot" use-macro attribute

independently of how the application is written, I don't see how to skip
that part and if it's done in zcml then it's better than having it
hardcoded in the page templates by all means...

/JM





More information about the Zope3-dev mailing list