好记性不如烂笔头。

Umbraco获取Dropdown预设值

 
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@{
	Layout = "pageMaster.cshtml";
	var dataType = ApplicationContext.Services.DataTypeService.GetDataTypeDefinitionByName("Nav - NavGroup - Dropdown list"); //Dropdown
	var preValuesFromDataType=library.GetPreValues(dataType.Id);
	preValuesFromDataType.MoveNext();
	var myIterator = preValuesFromDataType.Current.SelectChildren("preValue", "");
}
@while (myIterator.MoveNext())
{
	@myIterator.Current.GetAttribute("id", "")  @myIterator.Current.Value
}