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

Alex Sani alexsani.re a gmail.com
Gio 7 Feb 2013 05:38:11 UTC


Questo è un esempio funzionate: https://github.com/alexsani/test.extender

Ciao
Alex

Il 06 febbraio 2013 23:47, Giorgio Pieretti
<giorgio.pieretti a openprojects.it> ha scritto:
> Ci ho smanettato parecchio, ma sono rimasto deluso :(
> In pratica se cerco di fare le due cose SEPARATAMENTE:
> - Ordinare/nascondere alcuni campi (ISchemaModifier)
> - Aggiungere un campo (ISchemaExtender)
> Allora la cosa funziona.... ma quando si cerca di fare ENTRAMBE le cose,
> disastri!
> O per lo meno, io non ci sono riuscito...
> Vabbè... cambierò label e descrizione al campo imageCaption e userò
> quello :) :)
> Grazie comunque!
>
> Giorgio
>
> Il 03/02/2013 09:43, Giorgio Pieretti ha scritto:
>> Mmmm... se fa quello che dici è l'uovo di colombo!
>> Gli do' un'occhiata... GRAZIE!
>>
>> Giorgio
>>
>> Il 03/02/2013 06:00, Alex Sani ha scritto:
>>> Usa archetypes.schemaextender che implementa layer-aware in modo da
>>> fissare la modifica sulla sola istanza dove installi in prodotto.
>>> Ciao
>>> Alex
>>>
>>>
>>>
>>> Il giorno 02 febbraio 2013 23:49, Fabrizio Reale
>>> <fabrizio.reale a redomino.com <mailto:fabrizio.reale a redomino.com>> ha
>>> scritto:
>>>
>>>     Metti un validatore TTW.
>>>
>>>
>>>     --
>>>     Fabrizio Reale
>>>     Chief Technology Officer
>>>     http://linkedin.com/in/fabrizioreale
>>>
>>>     Redomino Srl
>>>     http://redomino.com
>>>     HQ Largo Valgioie 14, Turin IT
>>>     Phone +39 0117499875 <tel:%2B39%200117499875>
>>>
>>>     Il giorno 02/feb/2013, alle ore 19:43, Giorgio Pieretti
>>>     <giorgio.pieretti a openprojects.it
>>>     <mailto:giorgio.pieretti a openprojects.it>> ha scritto:
>>>
>>>     > Salve a tutti,
>>>     > ho la necessità di modificare lo schema standard dell'oggetto
>>>     News Item,
>>>     > mettendo dei REQUIRED dove prima non c'erano ed aggiungendo un campo
>>>     > nuovo. Per farlo ho aggiunto nel mio prodotto un
>>>     import_steps.xml che
>>>     > richiama un metodo in setuphandlers.py dove faccio:
>>>     > from Products.ATContentTypes.content.newsitem import ATNewsItem
>>>     > e modifico lo schema:
>>>     > ATNewsItem.schema['effectiveDate'].required = 1;
>>>     > ecc. ecc.
>>>     > Il problema (e per fortuna che me ne sono accorto in tempo!) è che
>>>     > questa modifica si ripercuote su TUTTE le istanze Plone, non solo su
>>>     > quella in cui è installato il mio prodotto!
>>>     > Lo so, potrei creare un Portal Type "Mio News Item", ma in questo
>>>     > momento mi fa più comodo usare l'oggetto di sistema.
>>>     > C'è un modo per ovviare al problema? Suggerimenti?
>>>     > Grazie!
>>>     >
>>>     > Giorgio
>>>     > _______________________________________________
>>>     > Plone-IT mailing list
>>>     > Plone-IT a lists.plone.org <mailto: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
>>>     _______________________________________________
>>>     Plone-IT mailing list
>>>     Plone-IT a lists.plone.org <mailto: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
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> 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
>
> _______________________________________________
> 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


Maggiori informazioni sulla lista Plone-IT