Last change
on this file since 178 was
1,
checked in by myroslav, 19 years ago
|
Building directory structure
|
File size:
885 bytes
|
Rev | Line | |
---|
[1] | 1 | from Globals import InitializeClass |
---|
| 2 | from AccessControl import ClassSecurityInfo |
---|
| 3 | |
---|
| 4 | def createMultiColumnList(self,slist, numCols, sort_on='title_or_id'): |
---|
| 5 | try: |
---|
| 6 | mcl = self.createMultiColumnList(slist, numCols, sort_on=sort_on) |
---|
| 7 | return mcl |
---|
| 8 | except AttributeError: |
---|
| 9 | return [slist] |
---|
| 10 | |
---|
| 11 | class SortedDict(dict): |
---|
| 12 | security = ClassSecurityInfo() |
---|
| 13 | security.declarePublic('items') |
---|
| 14 | def items(self): |
---|
| 15 | primary_metatags = ['description', 'keywords'] |
---|
| 16 | lst = [(name,self[name]) for name in primary_metatags \ |
---|
| 17 | if name in self.keys()] + \ |
---|
| 18 | [(name, self[name]) for name in self.keys() \ |
---|
| 19 | if name not in primary_metatags] |
---|
| 20 | return lst |
---|
| 21 | |
---|
| 22 | try: |
---|
| 23 | InitializeClass(SortedDict) |
---|
| 24 | except: |
---|
| 25 | pass |
---|
Note: See
TracBrowser
for help on using the repository browser.