Ignore:
Timestamp:
Dec 8, 2009 7:53:25 AM (14 years ago)
Author:
piv
Message:

merge from plone 2.1 branch: r2465-2483

Location:
quintagroup.transmogrifier/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.transmogrifier/trunk

    • Property svn:mergeinfo changed from /quintagroup.transmogrifier/branches/plone-2.1/quintagroup.transmogrifier:1387-1389,1394-1413 to /quintagroup.transmogrifier/branches/plone-2.1/quintagroup.transmogrifier:1387-1389,1394-1413,1426-1444
  • quintagroup.transmogrifier/trunk/quintagroup/transmogrifier/sitewalker.txt

    r275 r1446  
    1111pairs of contained items. 
    1212 
     13You can also specify an optional ``condition`` option; if given, content object 
     14is going into pipeline only if the condition, which is also a TALES is true. 
     15 
    1316>>> sitewalker = """ 
    1417... [transmogrifier] 
     
    1922... [sitewalker] 
    2023... blueprint = quintagroup.transmogrifier.sitewalker 
    21 ...  
     24... condition = python:context.getPortalTypeName() not in ('File', 'Image') 
     25... 
    2226... [printer] 
    2327... blueprint = collective.transmogrifier.sections.tests.pprinter 
     
    3842{'_type': 'Document', '_path': 'folder1/document2'} 
    3943{'_type': 'Document', '_path': 'document3'} 
     44 
     45 
     46The ``condition`` expression has an access to the following: 
     47 
     48=================== ========================================================== 
     49 ``context``         the current content object 
     50 ``transmogrifier``  the transmogrifier 
     51 ``name``            the name of the splitter section 
     52 ``options``         the splitter options 
     53 ``modules``         sys.modules 
     54=================== ========================================================== 
Note: See TracChangeset for help on using the changeset viewer.