Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Claushingebjerg 937 posts 2572 karma points
    Jan 30, 2023 @ 12:03

    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.

  • Nik 1601 posts 7202 karma points MVP 6x c-trib
    Jan 31, 2023 @ 22:45

    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:

    YouTubeValue? video = page.Value<YouTubeValue>("YouTube");
    if (!(video is null))
    // Ender the embed iframe
    // Render the video ID
    // Render other video information

    Src: Github Readme

    Hope that helps :-)


Please Sign in or register to post replies

Write your reply to: