Modify the newsletter to only include content from the current folder and below

Below you can see the diff. I added some more content types to check
for, removed the publish state (only because it’s easier while
testing), and added a path criterion which looks in the parent of the
CMFNewsletter object.

===================================================================RCS file: /cvsroot/collective/CMFNewsletter/Newsletter.py,vretrieving revision 1.37diff -r1.37 Newsletter.py164,167c164,171< crit.edit((’Document’, ‘News Item’, ‘Event’, ‘PlonePopoll’))< self.addCriterion(’review_state’, ‘String Criterion’)< crit = self.getCriterion(’review_state’)< crit.edit((’published’))—> crit.edit((’ATAudio’, ‘News Item’, ‘Event’, ‘Link’, ‘ATAmazon’, ‘ATAudioFolder’, ‘BandPortfolio’))> # self.addCriterion(’review_state’, ‘String Criterion’)> # crit = self.getCriterion(’review_state’)> # crit.edit((’published’))> crit.addCriterion(’path’, ‘String Criterion’)> crit = self.getCriterion(’path’)> current_path= ‘/’.join((self.aq_parent).getPhysicalPath())> crit.edit(current_path) 

0 Responses to “Modify the newsletter to only include content from the current folder and below”


  1. No Comments

Leave a Reply