source: products/quintagroup.quills.extras/trunk/quintagroup/quills/extras/browser/weblogcatsearch.py @ 1341

Last change on this file since 1341 was 1341, checked in by fenix, 15 years ago

fixed #95 ticket

File size: 899 bytes
Line 
1from zope.component.interface import interfaceToName
2from Products.CMFCore.utils import getToolByName
3from quills.app.browser.baseview import BaseView
4from quills.core.interfaces.enabled import IPossibleWeblog
5
6class WebLogCatSearch(BaseView):
7    """
8        Actually this view is migrated SimpleBlogCatSearch
9        template.
10    """
11
12    def __call__(self):
13        """
14            Returns entries list by specified category.
15        """
16
17        context = self.context.aq_inner
18        category = self.request.get('category', None)
19        portal = getToolByName(context, 'portal_url').getPortalObject()
20
21        if category:
22            #XXX'dui-library folder should not be hardcoded here, it should be
23            #searched as main weblog folder (archive)
24            url = "%s/dui-library/topics/%s"%(portal.absolute_url(), category)
25            return self.request.response.redirect(url)
Note: See TracBrowser for help on using the repository browser.