Prevent Sitefinity from Adding Any Code to Master Page - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

Prevent Sitefinity from Adding Any Code to Master Page

  • Prevent Sitefinity from Adding Any Code to Master Page
  • Hi there,

    I'm working on generating email templates for use within email campaigns in Sitefinity's Email Marketing Module. Out goal is to create resposnive email templates either Sitefinity's OOTB layout options or by using templates available via Mailchimp, Litmus and the like. The problem with the latter is that even after creating a new master page with a single placeholder, then populating the body of the email in a Content widget within the placeholder, Sitefinity adds additional code to the final HTML which unfortunately breaks the email template.

    I don't know how many of you have had the joy of working with responsive email templates, but getting them to place nice is no simple task and any extra code just adds to the complexity.

    So is there any way to use a master page, add the body of the email via a Content widget, and send the email off without Sitefinity adding anything extra to the code?

  • Problem exists for WebForm and hybrid layouts.

    Did you try with MVC layout?

    HTML markup in MVC layouts very very clean. And Content widget (Feather) don't add a lot of html markup. Only two divs ( )

    And you don't want to add anything extra, you can easily override widget template for content block and leave only this in widget template

    @model Telerik.Sitefinity.Frontend.ContentBlock.Mvc.Models.IContentBlockModel
    @using Telerik.Sitefinity.Frontend.Mvc.Helpers