Re: Maybe a PLIP for portlets?

Tonico Strasser <[email protected]> Thu, 13 May 2004 14:46:11 +0200
Newsgroups gmane.comp.web.zope.plone.design
Message-ID <[email protected]>
Mirto Silvio Busico wrote:

> Exact!!!!!!
> See comments inline
> 
> Tonico Strasser wrote:
> 
>> Mirto Silvio Busico wrote:
>>
>>> But there is a problem: if a portlet is defined, but doesn't generate
>>> any output, you obtain an empty graphic box (really more empty boxes
>>> than useful boxes)
>>>
>>> So my question: how you can say inside portlets_fetcher.pt if a portlet
>>> generates any output?
>>
>>
>> Hi Mirto,
>>
>> I think this question has nothing to do with your portlet design. I 
>> encountered a similar problem.
>>
>> Example
>>
>> Assuming a 3 column layout, I want to change it to a 2 column layout 
>> if the right slots are empty or portlets on the right side do not 
>> generate an output. This happens if a portlets have some conditions 
>> (i.e. the reviewer portlet). The 'prepare_slots' script can not detect 
>> if a portlet generates an output. So the 'hide_columns' script will 
>> not work.
>>
> EXACT!!!! This is my point!
> We need  a standard portlet definition that states:
> 
>  "every portlet have to return 2 parameters:
> 
>    1. return code: if the portlet have to be rendered or not
>    2. the portlet generated output 
> 
> "

I think this is very difficult because the portlets are rendered as 
macros in the context of the template. This has the andvantage that you 
can refer to variables defined in the template that calls the portlet.

In other words, the whole portlet concept needs to be rewritten for this 
functionality. That would break backward compatibility again. I might be 
wrong though.

Tonico



-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click