Closed gforcada closed 10 years ago
I'm not using snippets at the mo, so excuse me for not doing a pull request for this.
But try this in a setuphandlers.py
from Products.CMFPlone.interfaces import INonInstallable
from zope.interface import implements
class HiddenProfiles(object):
implements(INonInstallable)
def getNonInstallableProfiles(self):
"""
Prevents all profiles but 'default' from showing up in the
profile list when creating a Plone site.
"""
return [
u'snippets:uninstall',
]
With this added to configure.zcml
<!-- Hide the non default profiles -->
<utility
factory=".setuphandlers.HiddenProfiles"
name="snippets"
provides="Products.CMFPlone.interfaces.INonInstallable" />
I got this from plone.app.contenttypes as I recall
I tried this, and both profiles still show up. I can't figure out specifically what plone.app.contenttypes is doing differently to make it work.
I believe that your getNonInstallableProfiles should return [u'uwosh.snippets:uninstall',]
Yes, that would make sense
@enfold-josh @djowett That fixed it, thanks!
When creating a new Plone site, on the list of add-ons to install both install and uninstall profile show up.
I'm not sure how one can hide the uninstall one, but I guess there has to be a way to do so. Will grep for examples if time allows.