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

Yuri <[email protected]>
Newsgroups gmane.comp.web.zope.italian
Message-ID <[email protected]>
Alessandro Guarguaglini wrote:
> Alle venerdì 30 novembre 2007, Yuri ha scritto:
>   
>> Il fatto è che GenericPloneContent non mi permette la modifica della
>> macro di visualizzazione del widget... in archetypes avrei fatto (ho
>> preso l'esempio da un campo stringa, ma il concetto è quello):
>> [...]
>>     
> Potreste, a mio avviso, tentare questa strada :
>
> 1) crea un file chiamato [tuo_portal_type]_view (il nome deve comunque 
> essere tutto minuscolo!) copiando il contenuto di base.pt (dalla dir. 
> skins di archetype)
>
> 2) cambia il file cosi' :
>
> da =
>
>  <metal:body_macro metal:define-macro="body"
>     tal:define="field_macro field_macro | here/widgets/field/macros/view;"
>
>
> a =
>
>   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;"
>
> 3) crea il file my_field_macro partendo da widgets/field.pt e creando
> un'eccezione come sopra per il tuo campo, e usi come widget quello creato da te.
>
> Abbastanza brutto e macchinoso, ma potrebbe funzionare... :-)
>
> Visto che questo e' il mio primo messaggio, approfitto per salutare tutta la 
> lista, che seguo volentieri da tempo.
>
> Ciao, 
>
> Alessandro.
>
>   
mitico, la provo domani.

È che non conosco ancora bene quella parte di template di AT.

 Grazie a tutti per le info, nel frattempo ho risolto con un accrocchio :D
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.