Try Now
More in this section

Forums / Developing with Sitefinity / Prevent Sitefinity from Adding Any Code to Master Page

Prevent Sitefinity from Adding Any Code to Master Page

2 posts, 0 answered
  1. Chris
    Chris avatar
    1 posts
    18 Mar 2016
    13 Jun
    Link to this post

    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?

  2. Victor Leontyev
    Victor Leontyev avatar
    65 posts
    01 Jul 2014
    14 Jun in reply to Chris
    Link to this post

    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 (https://github.com/Sitefinity/feather-widgets/blob/master/Telerik.Sitefinity.Frontend.ContentBlock/Mvc/Views/ContentBlock/Default.cshtml )

    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


2 posts, 0 answered