title: umbraco 7: get property value
body: <p>I am using umbraco 7 ASP.NET C# MVC 4.</p>
  <p>Im trying to use the new umbraco, so far its been ok, but i need to get a property of one of my pages i set up.</p>
  <pre><code>@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
  @{
       var homePage = CurrentPage.AncestorsOrSelf(1).First();
  
       var menuItems = homePage.Children.Where(&quot;isMenu == true&quot;);
  
  }
  &lt;!-- Nav --&gt;
  
  &lt;div class=&quot;row&quot;&gt;
  &lt;div class=&quot;col-md-12 top-menu-container&quot;&gt;
      &lt;ul&gt;
          @* If the Url of the current page is &quot;/&quot; then we want to add the class &quot;current_page_item&quot; *@
          @* Otherwise, we set the class to null, that way it will not even be added to the &lt;li&gt; element *@
          &lt;li&gt;
              &lt;div onclick=&quot;location.href='/';&quot;  class=&quot;col-md-2 metro-container&quot; style=&quot;background-color:#@Model.Content.GetPropertyValue(&quot;navigationColor&quot;)&quot; &gt;
                  &lt;img class=&quot;menu-img&quot; src=&quot;../../media/1001/home.png&quot; alt=&quot;&quot; /&gt;
                  Home
              &lt;/div&gt;
          &lt;/li&gt;
  
          @foreach (var item in menuItems)
          {
              @* If the Id of the item is the same as the Id of the current page then we want to add the class &quot;current_page_item&quot; *@
              @* Otherwise, we set the class to null, that way it will not even be added to the &lt;li&gt; element *@
              
              &lt;li&gt;
                  &lt;div onclick=&quot;location.href='@item.Url';&quot;  class=&quot;col-md-2 metro-container&quot; style=&quot;background-color:#@item.Content.GetPropertyValue(&quot;navigationColor&quot;)&quot; &gt;
                      &lt;img class=&quot;menu-img&quot; src=&quot;../../media/1001/home.png&quot; alt=&quot;&quot; /&gt;
                      @item.Name
                  &lt;/div&gt;
              &lt;/li&gt;
          }
      &lt;/ul&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p>So the first &quot;li&quot; outside the loop i simply get the models content Getproperty method which surely enough gets me any property i tell it too.</p>
  <p>However the loop i have although goes through the current pages children, i cant seem to get a specific property.</p>
  <p>Makes it worse is intellicense Isn't working as its all runtime.</p>
  <p>The line in question is</p>
  <pre><code>&lt;div onclick=&quot;location.href='@item.Url';&quot;  class=&quot;col-md-2 metro-container&quot; style=&quot;background-color:#@item.Content.GetPropertyValue(&quot;navigationColor&quot;)&quot; &gt;
  </code></pre>
  <p>I need to get the color that was set on the page from the navigationColor control.</p>
  <p>What am i doing wrong here?</p>