Skip to content

Instantly share code, notes, and snippets.

@rasmusfjord
Created July 22, 2015 13:58
Show Gist options
  • Select an option

  • Save rasmusfjord/6d7c3a4a87b60cd2025e to your computer and use it in GitHub Desktop.

Select an option

Save rasmusfjord/6d7c3a4a87b60cd2025e to your computer and use it in GitHub Desktop.
@using Archetype.Models;
@using Archetype.Extensions;
@{
ArchetypeModel slider = Model.GetPropertyValue<ArchetypeModel>("slider");
}
@foreach (var fieldset in slider)
{
var title = fieldset.HasValue("overskrift") == true ? StringHelper.ReplaceParagraphsWithBreaks(fieldset.GetValue("overskrift").ToString()) : "";
var subtitle = fieldset.HasValue("underoverskrift") == true ? fieldset.GetValue("underoverskrift") : "";
var image = fieldset.HasValue("billede") == true ? fieldset.GetValue("billede") : null;
MultiUrls links = fieldset.HasValue("link") == true ? fieldset.GetValue<MultiUrls>("link") : null;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment