ciao vito,<br><br>non so come puoi farlo con genericsetup. <br>però mi hai incuriosito, mi son messo lo zaino e son partito in gita dentro al codice.<br>ravanando un po' ho trovato che per disegnare i menu si basa su <br>
_allowedTypes (in <a href="http://plone.app.contentmenu.menu.py">plone.app.contentmenu.menu.py</a>)<br>l'import è da:<br>from plone.app.content.browser.folderfactories import _allowedTypes<br clear="all"><br>che poi è definito:<br>
def _allowedTypes(request, context):<br> return context.allowedContentTypes()<br><br>per cui è tutto definito nel AT. <br>potresti ridefinire il metodo "patchandolo". fa un po' schifo.. ma magari..<br><br>
ho anche trovato:<br><a href="http://Products.Archetypes.AllowedTypesByIface.py">Products.Archetypes.AllowedTypesByIface.py</a><br>che non conoscevo e sembra tanto bellino, mi sembra di capire che non è utilizzato, ma in example c'è, appunto, un esempio.<br>
magari partendo da li..<br><br>ciao ciao<br><br>max<br><br>E. B. White - "Genius is more often found in a cracked pot than in a whole one."
<br><br><div class="gmail_quote">On Sun, Jan 18, 2009 at 8:19 PM, Vito Falco <span dir="ltr"><<a href="mailto:vitofalco@gmail.com">vitofalco@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
mhmmm.. mi aspettavo una cosa più "alla zope3", tramite direttiva xml.<br><br>Non ricordi proprio niente su questo notAllowedTypes?<br><br>Vito<br><br><div class="gmail_quote">2009/1/18 Fabrizio Reale <span dir="ltr"><<a href="mailto:fabrizio.reale@redomino.com" target="_blank">fabrizio.reale@redomino.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="Wj3C7c"><div><div></div><div><br>
> credo che la questione sia abbastanza banale ma al momento non mi sovviene<br>
> il codice adatto :-)<br>
><br>
> Ho creato un nuovo mio tipo e voglio che sia "aggiungibile" nelle folder del<br>
> portale solo quando queste sono markate con una data interface (ad esempio<br>
> IQuiPuoi).<br>
> Credo sia un codicillo da inserire in configure.zcml, vero?<br>
<br>
</div></div>Non ricordo se anche nel Plone 3 sia così, ma nelle versioni precedenti<br>
c'era un bellissimo script python tipo notAllowedTypes o qualcosa del genere<br>
che faceva il filtro di cosa si poteva aggiungere.<br>
Lì puoi mettere la tua condizione.<br>
<br>
Fabry<br>
<font color="#888888"><br>
--<br>
Fabrizio Reale<br>
<br>
Redomino S.r.l.<br>
Largo Valgioie 14,<br>
10146 Torino Italy<br>
Tel: +39 0117499875<br>
<a href="http://redomino.com" target="_blank">http://redomino.com</a><br>
<br>
</font><br></div></div>_______________________________________________<br>
Plone-IT mailing list<br>
<a href="mailto:Plone-IT@lists.plone.org" target="_blank">Plone-IT@lists.plone.org</a><br>
<a href="http://lists.plone.org/mailman/listinfo/plone-it" target="_blank">http://lists.plone.org/mailman/listinfo/plone-it</a><br>
<a href="http://www.nabble.com/Plone---Italy-f21728.html" target="_blank">http://www.nabble.com/Plone---Italy-f21728.html</a><br></blockquote></div><font color="#888888"><br><br clear="all"><br>-- <br>"Design is the method of putting form and content together. Design, just as art, has multiple definitions; there is no single definition. Design can be art. Design can be aesthetics. Design is so simple, that's why it is so complicated." by Paul Rand<br>
</font><br>_______________________________________________<br>
Plone-IT mailing list<br>
<a href="mailto:Plone-IT@lists.plone.org">Plone-IT@lists.plone.org</a><br>
<a href="http://lists.plone.org/mailman/listinfo/plone-it" target="_blank">http://lists.plone.org/mailman/listinfo/plone-it</a><br>
<a href="http://www.nabble.com/Plone---Italy-f21728.html" target="_blank">http://www.nabble.com/Plone---Italy-f21728.html</a><br></blockquote></div><br>