1

I have updated the location of "SampleNewsletter" directory location to allow seamless integration in my builds but it looks like in the message editor message editor, only layout.cshtml is updated and the other razor files (header, footer, etc) are not being updated from the new folder. File Structure

The updated file path in: /sitecore/layout/Layouts/System/Email/Sample Newsletter/Newsletter Layout enter image description here

I suspect I would only need to update a path for the other partials to be included into layout.cshtml.

2

The EXM newsletter renderings are controller renderings. You will need to update the code to point to your new partial view folder. If you do not have the source, your options are limited.

Controller

public ActionResult Header()
{
    return this.View(this._repository.GetFixedSectionViewModel(RenderingContext.Current.Rendering));
}

Specifying your view path

public ActionResult Header()
{
    return this.View("/Views/EmailNews/Header.cshtml", this._repository.GetFixedSectionViewModel(RenderingContext.Current.Rendering));
}

enter image description here

3
  • You custom controller is inheriting from Sitecore.EmailCampaign.SampleNewsletter.Controllers.NewsletterController ? Apr 22 '20 at 13:34
  • 1
    I decompiled the Sitecore code and made my own project.
    – Chris Auer
    Apr 22 '20 at 13:44
  • I would recommend the same thing
    – Chris Auer
    Apr 22 '20 at 13:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.