November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
If you only want the UI hint to affect the editor and not both the editor and template, you need to speficy this in your UIHint:
[UIHint("something", presentationLayer: PresentationLayer.Edit)]
Seems to be an issue with the iteration of the data.
hello
@foreach (var linkItem in Model ?? Enumerable.Empty())
{
- @Html.PageLink(linkItem)
}
hello always shows up
Is it not just that the misspelling in the sample UIHint that you posted above is causing this?
"LitemItemCollection"
That didn't resolve the issue, just a mistake a made when pasting the code.
Hi
Have you checked in debugger that you have your layoutmodel set and you have any items there when it is passed to template for LinkItemCollection?
We see that you have code to create the layoutmodel but do you actually ever set it for the implementation of your IPageViewModel?
So I would check the code that creates the viewmodel and sets the layoutmodel for it and have breakpoints in code to see that the value is set and if set at what point the linkitemcollection gets "nulled" if that is the case.
Also, I would strongly recommend to set a UI hint that's different from the value type. I'm not fully sure of the implementation but we resolve views with the value name so adding a hint that's the same as the name of the value seems like begging for trouble.
I am trying to add a LinkItemCollection in the footer-section of the page. The startpage has a LinkItemCollection that is called "LinkPages". Using edit-hints to connect it for the editors. When viewing the page, the links refuses to come up. Clicking on edit, or adding a new links makes them appear. Saving and viewing the page again and the items will not show up. The links are saved on the startpage LinkItemCollection but will not display.
Models/Pages/StartPage.cs
DisplayDemplates/LinkItemCollection.cshtml
IPageViewModel.cs
LayoutModel.cs
PageViewContextFactory.cs
Any ideas?