Geta

Meny NO

New version of Geta oEmbed

Another one of our popular modules has been updated to .NET 4.5 and EPiServer 8. It is still backward compatible with the old custom property and dynamic content. In the new version you'll now find a block that you can easily use as both local and shared.

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.

kommentarer drevet av Disqus