New version of Geta oEmbed

Frederik Vig 30.05.2015 14.14.18

oEmbed is a format for allowing an embedded representation of a URL on third party sites. Basically it allows editors to easily embed content from sites like YouTube, Vimeo, Flickr, Amazon and 300 other providers, by just copy/pasting the URL into their content. The module takes care of the rest (getting the right embed code). Very simple and useful for editors.

Getting started

Install-Package Geta.oEmbed

After the package is installed you'll have to register a free account on embed.ly to get an API key. In your web.config you should at the bottom see <oEmbedSettings apikey="your-key-here" />. Replace your-key-here with the API key from embed.ly.

Add oEmbedBlock to one of your content types:

public virtual oEmbedBlock EmbedBlock { get; set; }

And in your view:

@Html.PropertyFor(m => m.CurrentPage.EmbedBlock)

There's also a HTML helper method you can use:

@Html.oEmbed(Model.CurrentPage.EmbedBlock)

That's it! Build and run your site. You'll now be able to embed any content from the supported 300 providers.

Visit the projects GitHub repository for source code, issue list and more information.

Hope this helps.