Last change
on this file since 1423 was
813,
checked in by chervol, 17 years ago
|
tags container added
|
-
Property svn:eol-style set to
native
|
File size:
665 bytes
|
Rev | Line | |
---|
[813] | 1 | from zope import interface |
---|
[602] | 2 | from plone.app.viewletmanager.manager import BaseOrderedViewletManager |
---|
| 3 | from quills.core.interfaces.enabled import IWeblogEnhanced |
---|
[813] | 4 | from quills.core.interfaces import ITopicContainer, ITopic |
---|
| 5 | from quintagroup.quills.extras.browser.interfaces import IWeblogCategory |
---|
[602] | 6 | |
---|
| 7 | class ConditionalViewletManager(BaseOrderedViewletManager): |
---|
| 8 | |
---|
[813] | 9 | FILTER_INTERFACES = set([ITopic, IWeblogEnhanced, IWeblogCategory]) |
---|
[602] | 10 | def render(self): |
---|
[813] | 11 | iprovided = set(list(interface.providedBy(self.context))) |
---|
| 12 | if iprovided.intersection(self.FILTER_INTERFACES): |
---|
| 13 | return u'' |
---|
| 14 | return super(ConditionalViewletManager, self).render() |
---|
| 15 | |
---|
Note: See
TracBrowser
for help on using the repository browser.