Is there an option to convert just the Node and all its contents into an inlined email-ready chunk of code? Right now when I select Newsletter, it gives me the code for the entire current page, including all menus, blocks, views and non-node content.

Comments

amaisano’s picture

Title: Option to only inline Node content? » Option to only convert Node content?
jbomb’s picture

Category: feature » support

Yes, but it requires a little bit of work. I'm assuming that the menus, blocks and other non-node content is showing up in the header, footer and closure regions of your website. These regions are included in basic e-news template by default, but can be removed with the following steps.

  1. Copy [path-to-modules]/enews/enews.tpl.php to [path-to-active-theme]/enews.tpl.php
  2. Edit [path-to-active-theme]/enews.tpl.php and remove lines 32, 37 and 38
  3. Save [path-to-active-theme]/enews.tpl.php, and clear the theme cache by clicking "save configuration" on http://www.your-site.com/admin/build/themes.

Hope this helps.

jbomb’s picture

Title: Option to only convert Node content? » Provide GUI for selecting template regions that should be displayed in the newsletter template.
Assigned: Unassigned » jbomb
Category: support » feature

I'd like add a fieldset on the content type form that allows administrators to select which page regions are passed to the newsletter template. The fieldset should provide a feedback about the variable names and instructions on how to add the regions to the template file.

aaronbauman’s picture

Status: Fixed » Needs review
StatusFileSize
new6.6 KB

here's a patch that accomplishes #4, more or less.
specifically, this patch

  • adds a "Block Regions" sub-fieldset to the Content Type Edit > Newsletter settings fieldset
  • allows content type admins to set which block regions should be rendered in newsletter content
  • since there is no upgrade path, adds "nag" functionality for users who have upgraded from previous version of enews, so that they will verify the new settings and not be befuddled as to why some block regions disappeared from their newsletter
  • defines default included block regions in enews.module::_enews_default_regions() to match those defined in enews.tpl.php

cursorily related

  • if "content" block region is enabled, appends blocks in the "content" region to the $content variable, instead of rendering node_view() content only

kitten-killing updates (un-related to this issue, but bugging me for some time:

  • Adds translation strings
  • Renames the "Advanced" fieldset to "CSS Includes", since "Advanced" is even less descriptive with an additional fieldset next to it.

Updating from previous versions should be self-explanatory, but just in case:
0. if you are not overriding enews.tpl.php or theme_enews(), skip to #5
1. backup your database & code base
2. replace the old module directory with the new one
3. for each newsletter content type on your site, go to admin/content/node-type/CONTENT_TYPE, and review the block region settings
4. make sure that all the block region settings for each newsletter content type are enabled appropriately for each enews template
5. save the content type settings for each newsletter content type

If you do not follow the steps above, you'll be nagged to do so each time you visit a newsletter preview.

aaronbauman’s picture

Status: Active » Fixed

Status: Needs review » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.