The current set-up for linking content to a campaign (using macros and the 'Mailchimp campaign' Input format) is great, and seems to work well.

Initially, while using it I found that I had problems producing good output.

I make use of an admin theme in addition to my site's main (client facing) theme. When the content is built for insertion into a campaign, the default node.tpl.php template files are used from my admin theme, rather than my site's main theme.

This is partly good, because it means I can define a different set of templates for newsletter content - but ideally I think there should be a specific set of phptemplate files available from each site's main theme.



Does this already exist, and if not could be added as a feature?


Status:Active» Closed (duplicate)

This is really due to the lack of theme functions (which is the first step to template files), which is in #936504: Add theme functions. Marking this as a duplicate of that one.

Title:Provide specific mailchimp--<node>.tpl.php filesSelect theme to render entity macros
Status:Closed (duplicate)» Active

I think the important point here is that entities are turned into HTML using the current theme. Given that campaigns are added in admin/config/services/mailchimp/campaign/add Drupal renders them using admin theme.

HTML Mail module, and others, allow you to select the theme you want to use. This is specially relevant for campaign creation.

If we do that then the selecion of the template is based on the current rules. You could create a view mode for each desired visual representation of the entity and add a theme suggestion to select a custom template (maybe to use tables for complex layouts). You might also use Display Suite for the last part.