Re: [PROPOSAL] 'Region' generated ID set

Tonico Strasser <[email protected]> Thu, 18 Mar 2004 22:00:50 +0100
Newsgroups gmane.comp.web.zope.plone.design
Message-ID <[email protected]>
Michael Zeltner wrote:

>> The problem is that I was trying to create graphic boxes accordingly 
>> to the proposal in:
>>    http://www.vertexwerks.com/tests/sidebox/
> 
> 
> and that reminds me, joe, have you already thought about a new portlet 
> structure?

I want to share the way I changed the portlets for new.dzug.org:

Page template 'main_portlet'
--------
<div class="box"
      tal:attributes="id portlet_id|default"
      metal:define-macro="portlet">
   <div class="box-title">
     <h2 tal:content="portlet_title|default">Untitled</h2>
   </div>
   <div class="box-body"><metal:slot define-slot="portlet_body">
     Empty slot!
   </metal:slot></div>
</div>
--------

Page template 'demo_portlet'
--------
<metal:macro define-macro="portlet"
              tal:condition="python:1"
              tal:define="portlet_title string:Demo portlet;
                          portlet_id string:demo-portlet">
<metal:portlet use-macro="here/main_portlet/macros/portlet">
   <metal:body fill-slot="portlet_body">
     Demo content.
   </metal:body>
</metal:portlet></metal:macro>
--------

Pro's:

* Reuseable portlet structure

* <your pros's here>

Con's:

* Increasing complexity

* Maybe perfomance?

* Not compatible with current Plone portlets

* I18n not tested but should work

* <your con's here>

Tonico



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click