So i wrote a module without widgets. Now that i want to add widgets there seems to be a problem. Not sure if you just can't add widgets later on, or if i'm missing something.
I tried following http://www.deepcode.co.uk/2011/05/real-world-orchard-cms-part-3-creating.html
The widget needs to load data from an existing service. It doesn't require an adittion record in the database
Added to my existing module.txt
Name: Cart for NopCommerce
Description: Widget for show cart items and link to cart
Wrote this in migrations.cs
public class Migrations : DataMigrationImpl
public int Create()
builder => builder.Attachable());
public int UpdateFrom1()
// Tell the content def manager that we have a content type called TwitterWidget
// the parts it contains and that it should be treated as a widget
cfg => cfg
I added a file called Placement.info
And wrote the needed driver, view and widgetpart.
When i now run the orchard project, the debug doesn't seem to break on the Create() methode of migrations.cs. Since their never where any widgets, I presume it should have broken. Nor does the widget show up on the content page.
Judging from the table Settings_ContentTypeDefinitionRecord it hasn't been added to the system either.
I've read about people having success after restarting their IIS. Or when they changed the number value of UpdateFromX().
Anyone who has an idea of what i'm still missing?