source: products/quintagroup.transmogrifier/branches/plone-2.1/quintagroup.transmogrifier/quintagroup/transmogrifier/sitewalker.txt @ 1413

Last change on this file since 1413 was 407, checked in by piv, 18 years ago

set @@View permissions to cmf.ModifyPortalContent?

File size: 1.4 KB
Line 
1Site walker source section
2==========================
3
4A Plone site walker source pipeline section lets you create pipeline items from
5contents of Plone site folders. The site walker source section blueprint name is
6``quitagroup.transmogrifier.sitewalker``.
7
8A site walker source section will recurse through site's content tree, starting
9form folder, which is the context of transmogrifier, and will yield an item for
10each content object. For folder it will also add a tuple of (id, portal_type)
11pairs of contained items.
12
13>>> sitewalker = """
14... [transmogrifier]
15... pipeline =
16...     sitewalker
17...     printer
18...
19... [sitewalker]
20... blueprint = quintagroup.transmogrifier.sitewalker
21... excluded-types =
22...     File
23...     Image
24...
25... [printer]
26... blueprint = collective.transmogrifier.sections.tests.pprinter
27... """
28>>> registerConfig(u'quintagroup.transmogrifier.tests.sitewalker',
29...                sitewalker)
30>>> transmogrifier(u'quintagroup.transmogrifier.tests.sitewalker')
31{'_entries': (('document1', 'Document'),
32              ('folder1', 'Folder'),
33              ('document3', 'Document')),
34 '_path': '',
35 '_type': 'MockPortal'}
36{'_type': 'Document', '_path': 'document1'}
37{'_entries': (('folder2', 'Folder'), ('document2', 'Document')),
38 '_path': 'folder1',
39 '_type': 'Folder'}
40{'_type': 'Folder', '_path': 'folder1/folder2'}
41{'_type': 'Document', '_path': 'folder1/document2'}
42{'_type': 'Document', '_path': 'document3'}
Note: See TracBrowser for help on using the repository browser.