SnapNoris-2 wrote:
> 
> Obrigado pela resposta.
> Realmente é facil. 
> 
> Eu não tenho costume de colocar title, mas vou passar a ter
> 
> Nenhuma relação com o Chuck.
> 
> []s
> 
> Snap
>>
>> Opa SnapNoris[1],
>> 
>> > > Outra coisa, quando eu fui escolher os tipos de exibição,
>> > > apareceu o meu tipo pelo nome do arquivo e não como os outros
>> > > que aparecem la.
>> > >
>> > > Tabular, Sumária, Visão de Miniatura.
>> > > Onde eu poderia resolver isso?
>> >
>> > Eu já consegui fazer a ordenação como eu queria, mas qto ao nome
>> > eu não faço idéia.
>> 
>> é mais simples do que parece... basta ir no novo template e
>> definir o título (Title) que você quer que apareça... ;-)
>> 
>> [1] Alguma relação com o Chuck? :-D
>> 
>> HTH,
>> 
>> -- 
>> 
>> Dorneles Treméa
>> X3ng Web Technology
>> http://nosleepforyou.blogspot.com
>>
> 
> 
> 
> 

Contribuição:

Python Script 

Nome do Script :getPais

Argumento:pasta

Conteúdo do Script:

from Products.CMFCore.utils import getToolByName

pasta python: context.id();\results =
context.portal_catalog.searchResults(path =
'/'.join(context.portal_url.getPortalObject().getPhysicalPath()) + '/' +
pasta,
                                                sort_on='sortable_title',
                                                portal_type='Pais',)
plone_tool = getToolByName(context, 'plone_utils')
array = []
for result in results:
    array.append((result.id, result.getURL(), result.Title,
plone_tool.normalizeString(result.Title)))
undecorated = [(elemento[0],elemento[1],elemento) for elemento in array]
undecorated.sort()
decorated = [elemento[-1] for elemento in undecorated]
vetor_paises = decorated 
return vetor_paises

Page Template

<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en"
      lang="en"
      metal:use-macro="here/main_template/macros/master"
      i18n:domain="plone">
    <body>
        <div metal:fill-slot="main">
            <div>
                <script type="text/javascript">
                <!--
                    function MM_jumpMenu(targ,selObj,restore){ //v3.0
                       
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
                        if (restore) selObj.selectedIndex=0;
                    }
                //-->
                </script>
                 .
                 .
                 .
                <table>
                    <tr>
                        <td>Lista de Países:</td>
                        <td tal:define="caminho python:context.id;
                                        results
python:context.getPais(caminho);">
                            <form name="form" id="form">
                                <select name="jumpMenu" id="jumpMenu"
onchange="MM_jumpMenu('parent',this,0)">
                                    <option value="#">Selecione o
pais...</option>
                                    <tal:block repeat="pais results">
                                        <option   tal:attributes="value
python:pais[1]"
                                            tal:content="python: pais[2]">
                                        </option>
                                    </tal:block>
                                </select>
                            </form>
                        </td>
                    </tr>
                </table>
                 .
                 .
                 .
            </div>
        </div>
    </body>
</html>



-- 
View this message in context: 
http://n2.nabble.com/Ordem-Alfabetica-tp233845p1121770.html
Sent from the Zope & Plone - Portugal/Brazil mailing list archive at Nabble.com.

Responder a