title: Using Alternatives for Document.cshtml in Orchard CMS
body: <p>I am currently working on a website that requires the ability to overwrite the document.cshtml file so that I can apply a specific CSS-class based on the user's current location.</p>
  
  <p>I have attempted to use URL alternatives such as:</p>
  
  <ul>
  <li><strong>Document.cshtml</strong></li>
  <li><strong>Document-url-AreaA.cshtml</strong> </li>
  <li><strong>Document-url-AreaB.cshtml</strong></li>
  <li><strong>Document.url-AreaC.cshtml</strong></li>
  </ul>
  
  <p>however it appears that all of them use the Document.cshtml as opposed to using one based on the URL. I could easily understand that this is the intended purpose, however I was wondering if it would be possible to implement the functionality above.</p>
  
  <hr>
  
  <h1>Update</h1>
  
  <p>I believe that I may have made some progress in this area, as opposed to using URL alternatives, and simply adding a field on the Model (for the document) to simply pull the current "Area" of the site and apply that class to the body.</p>
  
  <p><em>(Within document.cshtml)</em></p>
  
  <pre><code>@using Orchard.Mvc.Html;
  @using Orchard.UI.Resources;
  @{
      RegisterLink(new LinkEntry {Type = "image/x-icon", ...});
  
      string title = Convert.ToString(Model.Title);
      string siteName = Convert.ToString(WorkContext.CurrentSite.SiteName);
  
       //Pull the Area here
      string area = Model.DesignatedAreaField;
  }
  &lt;!DOCTYPE html&gt; 
  &lt;html lang="en" class="static @Html.ClassForPage()"&gt; 
  &lt;head&gt; 
      &lt;meta charset="utf-8" /&gt;
      &lt;title&gt;@Html.Title(title, siteName)&lt;/title&gt; 
      @Display(Model.Head)
  &lt;/head&gt; 
  &lt;body class='@area'&gt;
  //Body goes here
  @Display(Model.Body)
  @Display(Model.Tail)
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I believe that this may be an easier solution than the one previously suggested. However, I am wondering what the easiest method of actually placing a field that I could access from the Model of the Document, would be.</p>