Prevent Sitefinity from Adding Any Code to Master Page

Posted by Community Admin on 04-Aug-2018 23:44

Prevent Sitefinity from Adding Any Code to Master Page

All Replies

Posted by Community Admin on 13-Jun-2016 00:00

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?

Posted by Community Admin on 14-Jun-2016 00:00

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 (github.com/.../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
@Html.Raw(Model.Content)

 

This thread is closed