我想获得一个完全合格的网址,这里是代码GetFullUrl不返回完整的URL - Sitecore的
string path = string.Format("/sitecore/shell/Applications/Content%20Manager/default.aspx?id={0}&la={1}&fo={0}", contentItem.ID, contentItem.Language);
string fullPath = Sitecore.Web.WebUtil.GetFullUrl(path);
text = text.Replace("$itemUrl$", fullPath);
这将返回这样的事情http://cp.localsite/sitecore/shell/Applications/Content%20Manager/default.aspx?id= {DC6B4AE0-929D,4F19-97F4-825796A30781 } & la = en & fo = {DC6B4AE0-929D-4F19-97F4-825796A30781} 这就像一个链接生成,直到?id =从id看起来像一个正常的文本。我如何解决这个问题。我想要内容的可点击网址。我非常感谢任何帮助。
谢谢。
在用户提交内容的工作流步骤中,我正在向批准者发送电子邮件通知。我正尝试发送电子邮件中的内容项目链接。我尝试了其他几种方式,请参阅http://stackoverflow.com/questions/26219873/custom-email-notification-with-link-sitecore – Newbie 2014-10-16 16:50:16
我试过编码字符串path = string.Format(“/ sitecore/shell /Applications/Content%20Manager/default.aspx?id={0}&la={1}&fo={0}“,contentItem.ID,contentItem.Language); string encodedPath = System.Web.HttpUtility.UrlEncode(path); string fullPath = Sitecore.Web.WebUtil.GetFullUrl(encodedPath); text = text.Replace(“$ itemUrl $”,fullPath);但这 – Newbie 2014-10-16 18:06:47
连续的评论....链接似乎没有工作......出来这样的事情是这样的http://cp.localsite/%2fsitecore%2fshell%2fApplications%2fContent%2520Manager%2fdefault.aspx%3fid%3d %7bDC6B4AE0-929D-4F19-97F4-825796A30781%7d%26la%3den%26fo%3d%7bDC6B4AE0-929D-4F19-97F4-825796A30781%7d – Newbie 2014-10-16 18:10:02