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
Hi, Im looking for some help with a dropdown list within LeBlender.
I can get the dropdown id number, but I am struggling to get the prevalue. Ive tried changing GetValue to GetPreValue, with no joy.
Any help would be grateful.
@inherits UmbracoViewPage<Lecoati.LeBlender.Extension.Models.LeBlenderModel> @if (Model.Items.Any()) { <ul class="highlight-tiles"> @foreach (var item in Model.Items) { var highlight = Model.Items.ElementAt(0); var title = highlight.GetValue<string>("title"); var summary = highlight.GetValue<string>("summary"); var color = highlight.GetValue<string>("dropdown"); <li class="highlight"> <div> @if (@item.GetValue("dropdown") != "") { <p>@item.GetValue("dropdown")</p> } @if (@item.GetValue("title") != "") { <h3 class="title">@item.GetValue("title")</h3> } @if (@item.GetValue("summary") != "") { <p class="summary">@Html.Raw(item.GetValue("summary"))</p> } </div> </li> } </ul> }
Hi Martin,
The same problem occurs with Archetype package, Umbarco dropdown datatype return ids, not values, so you have to get all pre-values first (don't forget to cache it)
More info:
https://our.umbraco.org/projects/backoffice-extensions/archetype/sound-off!/49659-Getting-value-id-instead-of-values%28text%29-from-dropdown#comment178790
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Get Prevalue
Hi, Im looking for some help with a dropdown list within LeBlender.
I can get the dropdown id number, but I am struggling to get the prevalue. Ive tried changing GetValue to GetPreValue, with no joy.
Any help would be grateful.
Hi Martin,
The same problem occurs with Archetype package, Umbarco dropdown datatype return ids, not values, so you have to get all pre-values first (don't forget to cache it)
More info:
https://our.umbraco.org/projects/backoffice-extensions/archetype/sound-off!/49659-Getting-value-id-instead-of-values%28text%29-from-dropdown#comment178790
is working on a reply...