Last active
December 16, 2015 15:39
-
-
Save sniffdk/5457886 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Typed | |
var ids = Model.Content.GetPropertyValue<string>("mNTP", true, "").Split(new[] {","}, StringSplitOptions.RemoveEmptyEntries); | |
var items = Umbraco.TypedContent(ids); | |
// Dynamic | |
@if (CurrentPage.HasValue("mNTP", true)) | |
{ | |
var ids = CurrentPage._mNTP.Split(','); | |
var items = Umbraco.Content(ids); | |
foreach (var item in items) | |
{ | |
<p>@item.Name</p> | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I didn't say, I wouldn't use your solution. I'm just saying your snippet looks more complicated than the one provided by Umbraco itself and I want to understand what the problem is before I switch. And when I say it doesn't work I just mean the values for the properties are not used (banner doesn't show anywhere) when I use underscore.
Anyway, thank you for your help. I have now enough material to go on. I'll post back when I have a working solution.