Last change
on this file since 1 was
1,
checked in by myroslav, 19 years ago
|
Building directory structure
|
File size:
695 bytes
|
Rev | Line | |
---|
[1] | 1 | ## Script (Python) "getAudioFiles" |
---|
| 2 | ##bind container=container |
---|
| 3 | ##bind context=context |
---|
| 4 | ##bind namespace= |
---|
| 5 | ##bind script=script |
---|
| 6 | ##bind subpath=traverse_subpath |
---|
| 7 | ##parameters=obj=None |
---|
| 8 | ##title= |
---|
| 9 | ## |
---|
| 10 | from Products.qRSS2Syndication.utils import listSyndicatableContent |
---|
| 11 | if not obj: |
---|
| 12 | obj = context |
---|
| 13 | if hasattr(context,'synContentValues') or context.portal_type=='Topic': |
---|
| 14 | count = int(context.portal_syndication.getMaxItems(obj)) |
---|
| 15 | res = context.portal_syndication.getSyndicatableContent(obj) |
---|
| 16 | # has to check and cut number of items to be displayed |
---|
| 17 | # to prevent feed bloat |
---|
| 18 | count = count<len(res) and count or len(res) |
---|
| 19 | res = res[:count] |
---|
| 20 | else: |
---|
| 21 | res = listSyndicatableContent(obj) |
---|
| 22 | return res |
---|
Note: See
TracBrowser
for help on using the repository browser.