Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
When using the Umbraco 6 API is there an equivalent to the library.GetPreValueAsString method?
// this will return a of all values (string) for the DataTypeId (int)
ApplicationContext.Services.DataTypeService.GetPreValuesByDataTypeId(id)
Thats not what he wants - is there an easy way to convert a prevalue to the corrosponding string?
I don't think there is one, personally I think there should be a method on UmbracoHelper, vote on this old(ish) issue http://issues.umbraco.org/issue/U4-1752
Hi again, I just submitted a pull request for to add a method the @Umbraco helper, but there is a method on the DataTypeService you can use, e.g.
@Umbraco
@if (Model.Content.HasValue("character")) { var ds = ApplicationContext.Services.DataTypeService; var preValue = ds.GetPreValueAsString(Model.Content.GetPropertyValue<int>("character")); <p>@preValue</p> }
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Umbraco 6 library.GetPreValueAsString
When using the Umbraco 6 API is there an equivalent to the library.GetPreValueAsString method?
// this will return a of all values (string) for the DataTypeId (int)
ApplicationContext.Services.DataTypeService.GetPreValuesByDataTypeId(id)
Thats not what he wants - is there an easy way to convert a prevalue to the corrosponding string?
I don't think there is one, personally I think there should be a method on UmbracoHelper, vote on this old(ish) issue http://issues.umbraco.org/issue/U4-1752
Hi again, I just submitted a pull request for to add a method the
@Umbraco
helper, but there is a method on the DataTypeService you can use, e.g.is working on a reply...