Pode deixar já conseguir uma solução.

com ajuda de um amigo resolvemos o problema.

estou enviando o código para se alguem precisar, ter uma idéia:

O page template para o portlet ficou assim:


<metal:block use-macro="here/global_defines/macros/defines" />

<html xmlns:tal="http://xml.zope.org/namespaces/tal";
      xmlns:metal="http://xml.zope.org/namespaces/metal";
      i18n:domain="plone">
<body>


<tal metal:define-macro="busca_banners"
     tal:define="physical_path python:
getattr(context,'banners').getPhysicalPath();
                 path python:'/'.join(physical_path);
                 banners
python:here.portal_catalog(path=path,portal_type='Image',review_state='published');
                 results python:random.sample(banners,1);">

    <div class="portletHeader">
        <span> Título do Portlet </span>
    </div>    

    <tal:links tal:repeat="obj results">
        <div style="text-align: center; text-size: 12px">
               <img src="#" tal:attributes="src
string:${path}/${obj/id}/image;
                                            title obj/Title;" title="#"/>
               <p tal:content="obj/Title">
                  Title
               </p>  
               <p tal:content="obj/Description">
                  Description
               </p>

              <tal:relatedItems tal:define="related
python:obj.getObject().computeRelatedItems();">
                     

                            <tal:related tal:repeat="item related"
                                         tal:define="use_view_action
site_properties/typesUseViewActionInListings|python:();">
                                <div tal:define="
                                        desc      item/Description;
                                        item_type item/portal_type;
                                        item_type_class python:
'visualIcon contenttype-' + normalizeString(item_type);
                                                                item_url  
item/absolute_url;
                                                                item_url  
python:test((item_type
in use_view_action), item_url+'/view', item_url)">
                                    
                                    <span>
                                    <a href="" class=""
                                        tal:attributes="href  item_url;
                                                        title
item/Description;">
                                        Leia Mais...
                                    </a>
                                    </span>
                                </div>
                            </tal:related>
                      
              </tal:relatedItems>
        </div>
    </tal:links>
</tal>
</body>
</html>

 
Abraços!

Wander Jardim

--- Em zope-pt@yahoogrupos.com.br, Wander Jardim <wanderjar...@...>
escreveu
>
> Olá lista!!
> 
> Seguinte: eu fiz um portlet baseado no script de banner rotativo do site
> leonardomiranda.com.br, onde a cada carregamento da página é exibido uma
> imagem a descrição e o titulo dessa imagem, mas eu gostaria de saber
é, como
> faço para inserir nesse portlet um link para um item do conteúdos
> relacionados.
> 
> o que eu quero fazer é algo parecido com o que tem nesse site
> <http://tti.tamu.edu/>(http://tti.tamu.edu/), do lado direito onte tem
> "FEATURED RESEARCHER".
> 
> Tem uma foto com uma breve descrição e um link para maiores detalhes, e
> trocando toda vez que a página for atualizada.
> 
> tem algum produto que já faça isso??
> 
> *Visão geral da versão do Plone*
> Plone 2.5.1,
> CMF-1.6.2,
> Zope (Zope 2.9.5-final, python 2.4.3, freebsd6),
> 
> 
> Obrigado desde já!!
> 
> Wander Jardim
>


Responder a