collective / collective.plonetruegallery

Very customizable and sophisticated gallery for Plone
https://pypi.python.org/pypi/collective.plonetruegallery
9 stars 20 forks source link

lineage compat #9

Closed jensens closed 12 years ago

jensens commented 12 years ago

to make plonetruegallerie collective.lineage compatible its enough to edit ptg's settings.py and import and use from zope.app.component.interfaces import ISite instead of IPloneSiteRoot

But this way one cant have global settings and override it by subsite.

So instead of using getSite I'd visit each parent to see if it provides ISite and if use it or visit the next parent and so on (traverse up). if its setting-less site it inherits the default_settings from its parent site (usally the plone root).

jensens commented 12 years ago

additional explanation: getSite returns always the next ISite, not specifically the IPloneSiteRoot, so the current code runs into a infinite recursion and fails at max recursion depth.

vangheem commented 12 years ago

Thanks for getting into this. Can you make the changes you describe? I've never actually used sub-sites so I think I'd feel better with you doing it.

I'm fine with the approach of looking up parent ISite objects.

Thanks.

vangheem commented 12 years ago

Fixed in latest. Can you give it a try?