Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Yanick Van Barneveld 27 posts 148 karma points
    Oct 03, 2016 @ 11:51
    Yanick Van Barneveld
    0

    Edit custom View folder in Umbraco Backoffice

    I have installed Postal MVC to my current Umbraco project. Postal automatically creates a folder in your "Views" folder called "Emails" . In this new folder there are email templates that you can use.

    Now I want, just like the "Partials" folder, that you can edit them in your Umbraco Backoffice, is there a simple way to add a new folder to this menu (see my Paint example below)? Or maybe even to the "Content" page?

    enter image description here

  • Dennis Adolfi 1082 posts 6450 karma points MVP 6x c-trib
    Oct 03, 2016 @ 12:14
    Dennis Adolfi
    0

    Hi Yanick.

    One way of soving this would be to move the "Email Views" folder from /Views/Email to /Views/Partials/Email. Then whey will automaticly appear in backoffice. And the just adjust your ActionResult so it returns the corrent view with a path:

    using Postal;
    
    public class EmailController : Controller
    {
      public ActionResult Index()
      {
          dynamic email = new Email("Example");
          email.To = "webninja@example.com";
          email.FunnyLink = DB.GetRandomLolcatLink();
          email.Send();
          return View("/Views/Partials/Email/Index.cshtml");
      }
    }
    

    Note that i have´nt tried Postal MVC but if it follow standard MVC routing there should´nt be a problem. At least its worth a try. :)

    Best of luck!

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies