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
Is there a using statement we should be referencing in our views when using this package? When I place the following code into my view...
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage<ContentModels.ContentPage> @using ContentModels = Umbraco.Web.PublishedContentModels; @using Umbraco.Web; @using Umbraco.Web.Models; @{ var membed = Model.Content.GetPropertyValue<List<MvcHtmlString>>("videoEmbed"); <div> @membed; </div> }
My web page outputs the following as a string...
System.Collections.Generic.List`1[System.Web.Mvc.MvcHtmlString];
I'm on Umbraco 7.6.7
Hi Blackhawk,
I need to update this package it think for better support with models builder.
Will see if I can put out a new release this week.
Dave
Awesome! And thanks for looking into it.
Hi,
I just released version 3.0.0
This should fix your problem. Seeing that you are using Modelsbuilder you can use this syntax assuming you are allowing multiple video's to be selected
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage<ContentModels.ContentPage> @using ContentModels = Umbraco.Web.PublishedContentModels; @using Umbraco.Web; @using Umbraco.Web.Models; @foreach(IHtmlString embed in Model.Content.VideoEmbed)
{
}
I just released v3.0.0 which has better models builder support.
You can now do this
@foreach(var embed in Model.Content.VideoEmbed) { <div>@embed</div> }
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Using statement for this package
Is there a using statement we should be referencing in our views when using this package? When I place the following code into my view...
My web page outputs the following as a string...
I'm on Umbraco 7.6.7
Hi Blackhawk,
I need to update this package it think for better support with models builder.
Will see if I can put out a new release this week.
Dave
Awesome! And thanks for looking into it.
Hi,
I just released version 3.0.0
This should fix your problem. Seeing that you are using Modelsbuilder you can use this syntax assuming you are allowing multiple video's to be selected
{
}
Dave
Hi Blackhawk,
I just released v3.0.0 which has better models builder support.
You can now do this
is working on a reply...