source: trunk/skins/lemill/RSSResults.py @ 3136

Revision 3136, 1.1 KB checked in by jukka, 9 years ago (diff)

Added chart.apis.google.com as external latex service and adjusted html escaping for latex code.

Line 
1## Script (Python) "RSSResults"
2##bind container=container
3##bind context=context
4##bind namespace=
5##bind script=script
6##bind subpath=traverse_subpath
7##parameters=max=30
8##title=RSS Results
9##
10REQUEST=context.REQUEST
11
12from Products.CMFCore.utils import getToolByName
13
14pc = getToolByName(context, 'portal_catalog')
15path=REQUEST['ACTUAL_URL'].split('/')
16results=[]
17
18if 'portfolio' in REQUEST:
19    if 'groups' in path:
20        try:
21            group=context.getBlog()       
22            if group:
23                results=pc.browsingSearch(REQUEST=REQUEST, sort_limit=max, group=group.UID(), author='', RSS=True)
24        except AttributeError:
25             pass
26    elif 'people' in path:
27        try:
28            results=pc.browsingSearch(REQUEST=REQUEST, sort_limit=max, group='', author=context.getMemberId(), RSS=True)
29        except AttributeError:
30            pass
31elif 'groups' in path:
32    try:
33        results=context.getRSSResults(max=max)
34    except AttributeError:
35        pass
36else:
37    results=pc.browsingSearch(REQUEST=REQUEST, sort_limit=max, RSS=True)
38results=results[:max]
39return results
Note: See TracBrowser for help on using the repository browser.