Anybody know how to get values from the Limbo Youtube package in Razor.
Docs say "This package features a property editor for inserting (via URL or embed code) a YouTube video. The property editor saves a bit of information about the video, which then will be availble in C#."
but i'm in VS code, and dont have intelliwhtasitsname.
Looking at the docs for the package if you added a property to your doc type called YouTube,
In your razor view you could output the following:
YouTubeValue? video = page.Value<YouTubeValue>("YouTube");
if (!(video is null))
{
// Ender the embed iframe
@video.Embed.Html
// Render the video ID
<pre>@video.Details.Id</pre>
// Render other video information
<pre>@video.Details.Title</pre>
<pre>@video.Details.Duration</pre>
<pre>@video.Details.Description</pre>
}
Get data from Limbo Youtube in Razor
Anybody know how to get values from the Limbo Youtube package in Razor.
Docs say "This package features a property editor for inserting (via URL or embed code) a YouTube video. The property editor saves a bit of information about the video, which then will be availble in C#."
but i'm in VS code, and dont have intelliwhtasitsname.
Hi Claus,
Looking at the docs for the package if you added a property to your doc type called
YouTube
,In your razor view you could output the following:
Src: Github Readme
Hope that helps :-)
Nik
is working on a reply...