#1: Allow Smart Folders inside Newsletters
NewsletterTopic is very limited compared with Smart Folder. Newsletter Topics must be copied into new Newsletters to reuse them. This proposal addresses these limitations by using Smart Folders.
- Proposed by
- Russ Ferriday
- Seconded by
- Justin Ryan
- Proposal type
- Architecture
- Repository branch
- topia-topic-improvement
- State
- being-discussed
Motivation
PloneGazette implements its own NewsletterTopic type to dynamically include content such as Events and News Items in newsletters that are emailed to a subscriber list. Those Newsletter topics must be included within the folderish Newsletter for them to appear. Successive Newsletters must copy a NewsletterTopic to repeat it in a new Newsletter.
Smart Folders are much more powerful than the old topic but until now they could not be included in a Newsletter.
Smart Folders' ability to limit selection by date offers the possibility of reusing one or more Smart Folders for successive Newsletters. To take advantage of this though, we must add the ability to include Smart Folders by reference or acquisition if they are outside the Newsletter.
The most common use case would be Smart Folders stored in a NewsletterTheme, IF they are only for use in Newsletters. Another use case would allow aquisition of a Smart Folder from a pool of content elements, for example allowing the same Smart Folder to be referenced in Newsletters as is referenced by a CMFContentPanels element, thus ensuring consistency between newsletters and site.
Assumptions
The easy way to template the results of a Smart Folder in a Newsletter reuses the listing macro from atct_topic_view. This is implemented in the branch at r31246:
<metal:listing metal:use-macro="object/atct_topic_view/macros/listing">
<metal:empty metal:fill-slot="no_items_in_listing"></metal:empty>
</metal:listing>
This results in a formatting change, moving away from the ul/li format that the current Newsletter generates. Matching the format of the old newsletter topic is not part of this proposal, since the Smart Folder format is acceptable, and more consistent with Plone styles.
Proposal
- Allow Smart Folders in a Newsletter
- Allow Smart Folders in a Section
- Allow inclusion of Smart Folder results in Newsletter and Section by referencing the Smart Folder through acquisition
- Remove the old NewsletterTopic & provide migration
Questionable:
- Allow sections to be acquired optionally across multiple newsletters or newsletter themes.
Implementation
A new branch:https://svn.plone.org/svn/collective/PloneGazette/branches/topia-topic-improvement incorporates minimal changes to allow Smart Folders in a Newsletter, and template changes to display the results.
Next steps:
- make Smart Folder output also work for text/plain format (currently works only for HTML format)
- make Smart Folders work in Sections
- allow Smart Folders to be referenced by acquisition from Newsletters and Sections
- remove NewsletterTopic. Provide migration to a simple default Smart Folder setting
- improve layout and simplify NewsletterMacros.pt
Deliverables
Migration
Unit tests
Localization check
Documentation
Risks
Removing NewsletterTopic, even with migration, will result in different formatting of Topic results. Should we consider HTML injection to make Smart Folder sourced topics look like the old Newsletter, and in the same way resolve issues for text/plain message format?
Progress log
r31245 : initial branch
r31246 : added Smart Folder to Newsletter allowed types. Added minimal template to render.
October 2nd 2006 : added Smart Folder acquisition to this proposal.
Participants
russf: Russ Ferriday
bitmvnch: Justin Ryan