Sending an Email with an Edit Page-link

Back from 2 healthy weeks of vacation on Iceland. Time to start blogging again!

graficos para opçőes binarias

This time I want to share a simple but useful snippet of code that sends an email to an EPiServer editor with a link that opens the page for editing in EPiServer Edit Mode.

ficar rico com opções binárias

How to create a go to Edit Mode link and mail it

string baselink = UriSupport.AbsoluteUrlFromUIBySettings("edit/"); string editlink = baselink + "SwitchLanguage.aspx?language=" + page.LanguageBranch + "&epUrl=" + Server.UrlEncode(baselink + "default.aspx?id=" + page.PageLink.ToString()); string pageurl = string.Format("<a href=\"{0}\">Edit '{1}'</a>", editlink, page.PageName); Utility.SendEmail("[email protected]", EPiServerProfile.Current.EmailWithMembershipFallback, string.Format("[Moderate] {0}", message), string.Format( @"<html><body><h1>{0}</h1><p>The page<b>'{1}'</b> must be review and published.</p>" + @"<p>Log in to EPiServer Edit Mode and use the following ID in the bottom left search box:<br/>" + @"ID: <b>{2}</b></p>" + @"<p>Or click on the following link to login and review the page:<br/>{3}</p>", new object[] {message, page.PageName, page.PageLink.ID, pageurl}));

Works with unpublished versions of pages

The code above expects a PageData object in the page variable. It handles WorkPageID if you send in a page that is just saved or retrieved through PageVersion class.

olagligt att beställa Sildenafil Citrate på nätet

Read more about How to work with Unpublished PageData from code in a previous blog post!

miglior demo opzioni binarie in italiano

As usual, please leave a comment if you find it useful or have something to add. It is good for my blogging morale. :-)

Seroquel us