Skip to main content

Posts

Showing posts from July, 2013

Umbraco Razor, Fill in a Dropdownlist or Mega drop down from DataTypes using a Function

@using Examine @using Examine.SearchCriteria @using UmbracoExamine @using System.Xml.XPath @helper fillDropDown(int thisPreValue, string thisLocation)     {XPathNodeIterator preValueRootElementIterator = umbraco.library.GetPreValues(thisPreValue);   preValueRootElementIterator.MoveNext();   XPathNodeIterator preValueIterator = preValueRootElementIterator.Current.SelectChildren("preValue", "");   <div class="col_4 responsive_thirds">         <ul>   @Html.Raw("<li><strong><a href=\"#selectionmenu?location=" + @thisLocation + "\">" + @thisLocation + "</strong></li>")   @while (preValueIterator.MoveNext()) {   <li>    @Html.Raw("<a href=\"#selectionmenu?location=" + @preValueIterator.Current.Value + "\">")   @preValueIterator.Current.Value @Html.Raw("</a>")  </li&