[Plone-IT] Customizzare News Item per singola istanza Plone

Giorgio Pieretti giorgio.pieretti a openprojects.it
Ven 8 Feb 2013 12:36:11 UTC


GIUSTO!!
Alla fine non credo di essere l'unico ad aver avuto questa necessità...
Per ora ho risolto "alla vecchia maniera", creando un nuovo oggetto e
facendo un subclass... rapido ma non indolore perchè devo customizzare
anche il portlet_news, nascondere il tipo News Item, modificare la
collection in /notizie, ecc ecc ecc
Appena avro' concluso questo progetto, daro' una chance a
collective.contentrules.talesaction come suggeriva Davide Moro.
Grazie a tutti per l'impegno profuso :)

Giorgio

Il 08/02/2013 12:49, Luca Fabbri ha scritto:
> Scusate, vorrei concludere la discussione per i posteri!
>
> Ricapitolando: il mio suggerimento di usare la verifica del layer in
> effetti non andava bene!
>
> L'uso di ISchemaModifier in effetti non va bene in questo caso, perché
> modifica davvero lo schema (è documentato dei test).
> https://github.com/plone/archetypes.schemaextender/blob/62ac955e39a71f18381482813419e9956d8e52d0/archetypes/schemaextender/usage.txt#L207
>
> Quindi: meglio non usare "fiddle" in questi casi!
>
> Direi che sono stati dati altri buoni suggerimenti (alcuni forse più
> semplici di tutto questo caos), MA... se volessimo rimanere nell'idea
> iniziale di usare schemaextender credo potresti:
>  * NON usare ISchemaModifier
>  * usare solo IBrowserLayerAwareExtender.
>
> In questo caso dovresti ridefinire il field "effectiveDate" (stesso
> id) uguale a quello base + l'impostazione "required", quindi
> ridefinisci il campo aggiungendolo alla lista fields, nella classe, e
> in questo caso devi andarti a copiare/incollare tutte le impostazioni
> base
>
>
>
>
> 2013/2/8 Giorgio Pieretti <giorgio.pieretti a openprojects.it>:
>> Hai ragione :)
>> piazzando un bel:
>>
>> for="mio.prodotto.interfaces.IMioLayer"
>>
>> si risolve.
>> - 1 :)
>>
>> Il 08/02/2013 10:08, Luca Fabbri ha scritto:
>>> 2013/2/8 Giorgio Pieretti <giorgio.pieretti a openprojects.it>:
>>>> Ottima idea, provato, non cambia nulla :(
>>>> INOLTRE ho individuato un altro problema: nel caso in cui i prodotti che
>>>> usano archetypes.schemaextender su uno stesso portal_type (in questo
>>>> caso News Item) dovessero essere più di uno, si genera un errore alla
>>>> partenza di Plone:
>>>>
>>>>  raise ConfigurationConflictError(conflicts)
>>>> zope.configuration.config.ConfigurationConflictError: Conflicting
>>>> configuration actions
>>>>   For: ('adapter', (<InterfaceClass
>>>> Products.ATContentTypes.interfaces.news.IATNewsItem>,), <InterfaceClass
>>>> archetypes.schemaextender.interfaces.ISchemaExtender>, '')
>>>>
>>>> In pratica, posso usare archetypes.schemaextender solo su UN portal_type
>>>> in UNA specifica Plone istance :( :(
>>>> Me ne sono accorto quando nel buildout avevo abilitato il mio prodotto +
>>>> test.extender
>>>> Mi sa che l'idea della collective.contentrules.talesaction potrebbe
>>>> essere vincente...
>>>> PER ora risolverò creando un nuovo oggetto ed ereditando, sennò sto
>>>> lavoro non lo finisco mai più :) ma alla prossima Plone istance tenterò
>>>> la strada della talesaction...
>>>> GRAZIE A TUTTI PER L'AIUTO! :)
>>>>
>>> No, questo è un problema noto, devi creare dei named adapter (è
>>> scritto anche nella documentazione del pacchetto).
>>>
>>>
>> --
>> --
>> Ing. Giorgio Pieretti
>> Web & Apps developer
>> giorgio.pieretti a openprojects.it
>>
>> OPENPROJECTS di Giorgio Pieretti
>> via Mameli 33/E
>> 34015 - Muggia (TS)
>> Cell  +39 338 3579793
>> Tel   +39 040 9278161
>> Fax   +39 040 9890519
>> http://www.openprojects.it
>>
>>
>> ------------------------------------------------------------------
>> The information in this email is confidential and is intended
>> solely for the addressee(s). Access to this email by anyone
>> else is unauthorised. If you are not an intended recipient,
>> you must not read, use or disseminate the information
>> contained in the email. Any views expressed in this message
>> are those of the individual sender, except where the sender
>> specifically states them to be the views of Openprojects di
>> Giorgio Pieretti
>>
>> _______________________________________________
>> Plone-IT mailing list
>> Plone-IT a lists.plone.org
>> https://lists.plone.org/mailman/listinfo/plone-plone-it
>> http://plone-regional-forums.221720.n2.nabble.com/Plone-Italy-f221721.html
>
>

-- 
--
Ing. Giorgio Pieretti
Web & Apps developer
giorgio.pieretti a openprojects.it

OPENPROJECTS di Giorgio Pieretti
via Mameli 33/E
34015 - Muggia (TS)
Cell  +39 338 3579793
Tel   +39 040 9278161
Fax   +39 040 9890519
http://www.openprojects.it


------------------------------------------------------------------
The information in this email is confidential and is intended
solely for the addressee(s). Access to this email by anyone
else is unauthorised. If you are not an intended recipient,
you must not read, use or disseminate the information
contained in the email. Any views expressed in this message
are those of the individual sender, except where the sender
specifically states them to be the views of Openprojects di 
Giorgio Pieretti



Maggiori informazioni sulla lista Plone-IT