wiki:qTopic

qTopic

Build SmarFolder queries on custom catalogs

The idea of qTopic is to allow building SmartFolder queries on custom catalogs added to Plone site. We had to update atct tool to keep the track of all catalogs indexes and metadata, cause standard implementation supports only portal_catalog.

How-To: Send newsletter with PloneGazette to selected groups of CMFMembers

Starting conditions:

  • CMFMember installed in the plone site, membership migrated to CMFMember
  • PloneGazette installed in the plone site
  • in the root of site we have 'gazette' an insctance of Newslettertheme
  • we have several members for tests
  • we have set up group membership for members

To allow building Criterias on custom folders we have to update SmartFolde configuration. It is located in separate configlet listed in Plone Control Panel (under 'site setup') link, and called 'Smart Folder Settings'

Select member_catalog in the catalogs dropdown to edit searchable indexes list for it.

We are going to filter members by group, so we need to add 'getGroups' index, set Allowed Criterias to 'List of values' and 'Text'.

The result of our query should list id, Email, and Fullname of member. Switch to 'smart folder metadata' tab and add getFullname, getEmail columns (add appropriate headers for the columns) to make them visible in SmartFolder result view or CSV file.

Add new qTopic instance in the root of site let its title be 'Test.com Subscribers'. In our sample qTopic working catalog will be 'members_catalog'.

On the next edit screen 'export' select 'Short Name','Full Name', 'Email' (this is the titles set in 'smart folder metadata' configlet earlier). You can also switch headers and change the CSV delimiter here.

Now on the criteria tab set Sorting on Creation date and preview the data.

On the 'export in csv' tab you will see.

Now lets filter Groups. We have to add new criteria for groups set it type to 'list of Values'. Then add Administrators and Designers values to the Group criteria.

Resulting set of Memebers will look this way.

You can also export and download your data into CSV in one click clicking the action icon.

The last step let add the custom list of subscribers to PloneGazete. We have added special script in skins 'getPGNewsletterSubscribers' which formats data obtained fron qTopic in context into PloneGazette format.

Add new 'newsletter' to the gazette and check the send tab it should view the number of extra recipients, that we just generated with help of qTopic.

Last modified 15 years ago Last modified on Dec 1, 2009 2:50:23 PM

Attachments (10)

Download all attachments as: .zip