Andy Neillans
Andy Neillans

Reputation: 368

Orchard CMS - Creating a new Widget

I'm trying to write an Orchard Widget, but the page (Writing a Widget) appears to be out of date.

Specifically, this piece of code does not compile as AlterTypeDefinition does not exist on 1.4:

ContentDefinitionManager.AlterTypeDefinition("MapWidget", cfg => cfg
.WithPart("MapPart")
.WithPart("WidgetPart")
.WithPart("CommonPart")
.WithSetting("Stereotype", "Widget"));

Any pointers on what has replaced it?

Upvotes: 0

Views: 759

Answers (1)

Andy Neillans
Andy Neillans

Reputation: 368

For anyone else that hits this - its because AlterTypeDefinition is an extension method.

Add the following using:

using Orchard.ContentManagement.MetaData;

Upvotes: 2

Related Questions