Quantcast
Channel: Developer to developer
Viewing all articles
Browse latest Browse all 9076

CollectionEditorDescriptor

$
0
0

I am following this article for user to create list items using block. https://world.episerver.com/blogs/per-magne-skuseth/dates/2015/11/trying-out-propertylistt/

this article doesn't provide details about how the view should look like.

Have copied my view code below, unfortunately view doesn't show the controls to capture the list items for some reason.

view code :-

@model KeyValueContentListBlock

@if (Model != null && Model.KeyValues !=null)

{

foreach (var element in Model.KeyValues)

{

@Html.LabelFor(m => element.Key)

<divclass="clearfix" @Html.EditAttributes(x => element.Key)>

@Html.PropertyFor(x => element.Key)

</div>

<br/>

@Html.LabelFor(m => element.Content)

<divclass="clearfix" @Html.EditAttributes(x => element.Content)>

@Html.PropertyFor(x => element.Content)

</div>

}

}

I am new to episerver and any help would be appreciated.


Viewing all articles
Browse latest Browse all 9076