orchardcms - Creating Custom Widget in Visual Studio in Orchard 1.7 -


i trying build simple widget 2 input fields name , email address. right following http://www.deepcode.co.uk/search?q=how+to+build+a+widget+without+a+model+in+orchard.

migration.cs

public int updatefrom22() {     contentdefinitionmanager.altertypedefinition("quicklinkwidget", builder => builder     .withpart("quicklinkwidgetpart")     .withpart("commonpart")     .withpart("widgetpart")     .withsetting("stereotype", "widget"));      return 23; } 

contentpartrecord (models/quicklinkwidgetrecord.cs)

public class quicklinkwidgetrecord : contentpartrecord  {     //we shall not define property class.     //we shall not create handler widget because not need store data our database. } 

contentpart: (models/quicklinkwidgetpart.cs)

public class quicklinkwidgetpart : contentpart<quicklinkwidgetrecord> {     //again shall not definte record property here......     //we shall not create handler widget because not need store data our database. } 

handler

did not define don't have deal repository.

driver: ((models/quicklinkwidgetdriver.cs))

public class quicklinkwidgetdriver : contentpartdriver<quicklinkwidgetpart>  {     override driverresult display(quicklinkwidgetpart part, string displaytype, dynamic shapehelper)     {     //we not have property defined in model class.     //so don't have assign default values anything!     //we shall return shape of widget     } } 

placement.info:

<place widgets_quicklinkwidget="asidefirst:1" /> 

and view: views/widgets/quicklinkwidget.cshtml

@using emfluence.intrust.models;  @model contact  <h2>our side link widget</h2> 

nothing added in view

please me understanding doing wrong. why not able see widget rendered @ all? stuck last 3 days!, want see rendering first!

thanks in advance fro help

i had similar issue , got working changing setting on placement.info file...in case try

<place widgets_quicklinkwidget="content" /> 

Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -