[ { "id": "HebhGiTn3W0", "title": "CADDIE B ARIMO FREESTYLE2013 ( OFFICIAL BY SLIMDOGGZ ENTERTAINMENT)" }, { "id": "yZ2dBhlx8Ec", "title": "Carlos Green ft Bruce- Hande (Official HD By Slimdoggz Entertainment)" }, { "id": "XB7eN-UEtws", "title": "Chatzman Bhazi remangoma (BODY SLAM RIDDIM VIDEO BY SLIMDOGZ ENTERTAINMENT)" }, { "id": "-cAh9zMAsSA", "title": "BEENIE VIBES FREESTYLE (Official HD By Slimdoggz Entertainment)" }, { "id": "UVY0_9tf1uw", "title": "Bosslee ft Silent Killer, Master lee &Bongie Dee- bwanji uyu (Official video by Slimdoggz 2011)" }, { "id": "0WzHPW7XWyo", "title": "Bounty Lisa freestyle(Offiacial HD By Slimdoggz Entertainment)" } ]
My data type name is "YouTube", and document type property is "video", macro "YouTube"
Hello Nelson,
It seem that this is rendering out the RAW JSON for you as opposed to the strongly typed videos.
Can I check with you what version of Umbraco you are using please?
Next can I verify that you have put this direct into your .cshtml Razor template for that page rather in a Macro and see if that has any difference/changes for you at all?
Videos not showing
Hi guys. I am using your example
@using YouTube.Models
@foreach (var typedVideo in Model.Content.GetPropertyValue<YouTube>("video"))
{
<div>@Html.Raw(typedVideo.Player.EmbedHtml)</div>
@typedVideo.Snippet.Title<br/>
@typedVideo.Statistics.ViewCount<br/>
@typedVideo.Snippet.PublishedAt.Value.ToShortDateString()
}
But I see this on the page
[ { "id": "HebhGiTn3W0", "title": "CADDIE B ARIMO FREESTYLE2013 ( OFFICIAL BY SLIMDOGGZ ENTERTAINMENT)" }, { "id": "yZ2dBhlx8Ec", "title": "Carlos Green ft Bruce- Hande (Official HD By Slimdoggz Entertainment)" }, { "id": "XB7eN-UEtws", "title": "Chatzman Bhazi remangoma (BODY SLAM RIDDIM VIDEO BY SLIMDOGZ ENTERTAINMENT)" }, { "id": "-cAh9zMAsSA", "title": "BEENIE VIBES FREESTYLE (Official HD By Slimdoggz Entertainment)" }, { "id": "UVY0_9tf1uw", "title": "Bosslee ft Silent Killer, Master lee &Bongie Dee- bwanji uyu (Official video by Slimdoggz 2011)" }, { "id": "0WzHPW7XWyo", "title": "Bounty Lisa freestyle(Offiacial HD By Slimdoggz Entertainment)" } ]
My data type name is "YouTube", and document type property is "video", macro "YouTube"
Please help
Hello Nelson, It seem that this is rendering out the RAW JSON for you as opposed to the strongly typed videos.
Can I check with you what version of Umbraco you are using please?
Next can I verify that you have put this direct into your .cshtml Razor template for that page rather in a Macro and see if that has any difference/changes for you at all?
I look forward to hearing back from you.
Thanks,
Warren :)
Hi Warren
Thanks for your help. I was using a macro but I have put it in my Razor template and it works fine.
Thanks
Nelson
is working on a reply...