Re: [ZIZope] Madifica template di view con GenericPloneContent]

Alessandro Guarguaglini <[email protected]>
Newsgroups gmane.comp.web.zope.italian
Message-ID <[email protected]>
Alle lunedì 03 dicembre 2007, Yuri ha scritto:

> >   tal:define="my_field_macro python: test(field.getName == 'my_field',
> >                                       
> > context.my_field_macro.macros['view'], '');
> >               field_macro my_field_macro | field_macro |
> > here/widgets/field/macros/view;"
>
> credo che '' non venga interpretato come None, forse volevi dire:
>
>   tal:define="my_field_macro python: test(field.getName == 'my_field',
>                                       
> context.my_field_macro.macros['view'], None);
>               field_macro my_field_macro | field_macro |
> here/widgets/field/macros/view;"
>
> ma comunque credo lo trovi nello spazio dei nomi e si fermi al primo.
Si, hai ragione, avrebbe funzionato se field_macro fosse stata una string: 
expression, ma non con un path: come invece e'. 
L'unico rimedio che mi viene in mente e' fare qualcosa del genere :

tal:define="my_field_macro python: test(field.getName == 'my_field',
                       context.my_field_macro.macros['view'], None);
            std_field_macro field_macro | here/widgets/field/macros/view
            field_macro python: test(my_field_macro,my_field_macro,std_field_macro);"


Purtroppo non ho ora come ora il tempo a disposizione per fare delle prove, 
spero per te che ti venga in soccorso qualcuno piu' esperto! :-)



-- 
"Ubuntu" - an African word, meaning "Slackware is too hard for me".
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.