0 votes

MBran Open Graph

An Umbraco plugin which adds open graph metadata to Umbraco powered sites

1. Install the package either from Nuget or Umbraco package

2. Create a new data type from "MBran.OpenGraph" type

3. Add new property to your doctype and select the data type you have created from step#2.

4. Edit your page from the backoffice and fill the necessary details for the Open Graph. 

5. Save your changes.

4. Add the following snippet on your html template:

/* This will search for the first property that is of type MBran.OpenGraph */



/* This will get the page property "docTypePropertyName" */



5. Load your html page and view the code for metadata. It should look something like the below:

<meta property="og:title" content="My Website">

<meta property="og:type" content="website">

<meta property="og:description" content="This is  the description that will show  when sharing this link to  social media.">

<meta property="og:site_name" content="My site">


6. If you wish to have default values for opengraph metadata, you can pass an argument as an IEnumerable. The values specified on this argument will be overwritten by any matching key from the property value.

@Html.OpenGraph("docTypePropertyName", new []


    new { key = "og:site_name", value="My site" }



@Html.OpenGraph("docTypePropertyName", new List<OpenGraphMetaData>


    new OpenGraphMetaData{ Key = "og:site_name", Value = "My site"}



Package owner

Mark Gil Libres

Mark Gil Libres

Mark has 113 karma points

Package Compatibility

This package is compatible with the following versions as reported by community members who have downloaded this package:
Untested or doesn't work on Umbraco Cloud
Version 8.6.x (untested)
Version 8.5.x (untested)
Version 8.4.x (untested)
Version 8.3.x (untested)
Version 8.2.x (untested)
Version 8.1.x (untested)
Version 8.0.x (untested)
Version 7.15.x (untested)
Version 7.14.x (untested)
Version 7.13.x (untested)
Version 7.12.x (100%)
Version 7.11.x (100%)
Version 7.10.x (100%)
Version 7.9.x (100%)
Version 7.8.x (100%)
Version 7.7.x (100%)
Version 7.6.x (untested)
Version 7.5.x (untested)
Version 7.4.x (untested)
Version 7.3.x (untested)
Version 7.2.x (untested)
Version 7.1.x (untested)
Version 7.0.x (untested)
Version 6.2.x (untested)

You must login before you can report on package compatibility.

Package Information

  • Package owner: Mark Gil Libres
  • Created: 17/11/2018
  • Current version 1.0.0
  • .NET version 4.5.2
  • License MIT
  • Downloads on Our: 132
  • Downloads on NuGet: 276
  • Total downloads : 408

External resources