title: Get Orchard ContentItem display URL
body: <p>When I'm in a View Alternate, I know I can get the display URL of a ContentItem by using:</p>
  
  <p><code>@Url.ItemDisplayUrl(contentItem)</code></p>
  
  <p>But I don't know how to get the display URL when I'm in a controller context (ActionResult). For sitemap purposes, I require the URL of the listed ContentItems.</p>
  
  <p>I'm using the code below. </p>
  
  <pre><code>public class SiteMapResult : ActionResult
  {
      readonly IContentManager _contentManager;
      readonly ITagService _tagService;
  
      public SiteMapXmlResult(IContentManager contentManager, ITagService tagService)
      {
          _contentManager = contentManager;
          _tagService = tagService;
      }
  
      public override void ExecuteResult(ControllerContext context)
      {
          context.HttpContext.Response.ContentType = "text/xml";
  
          string host = context.HttpContext.Request.Url.Host;
          StringBuilder xml = new StringBuilder();
          xml.Append(@"&lt;?xml version=""1.0"" encoding=""UTF-8""?&gt;");
          xml.Append(@"&lt;urlset xmlns=""http://www.sitemaps.org/schemas/sitemap/0.9""&gt;");
  
          var contentItems = _contentManager.Query(VersionOptions.Latest, GetContentTypeNames().ToArray()).List();
          foreach (var contentItem in contentItems)
          {
  
              // The display url of contentItem
  
          }
  
          ...
  
      }
  }
  </code></pre>
  
  <p>How can I get the ContentItem display URL?</p>