Orchard Hungary is an archive

This site is now an archive. We'll keep it so the content is accessible, but we won't update it anymore. However, we frequently publish Orchard-related news on our other site Orchard Dojo, so be sure to check that out instead. And if you're interested in news about our Orchard development company, Lombiq, check out our website.

Content part development checklist

Tags: content part, module development, development

Make sure you don't forget anything if you develop a content part. Here's a high-level checklist you can run through so you don't forget anything:

  • The part class itself
  • Part record
  • Migrations: for the record, and if the part should be attachable, also for the part
  • Handler: with at least the necessary plumbing for the record
  • Driver: needed even if you only intend to use your part from code (by "casting": contentItem.As<MyPart>())
    • Display and Editor methods
    • Importing/Exporting
    • Don't forget to add a Prefix!
  • Placement.info with Place elements for the display and editor shapes
  • All the necessary shape templates (views)

Forgetting Placement.info is a common issue; don't waste your time!

Happy content part development!

No Comments

  • Xeevis said

    I created a basic template to start from so I don't forget anything. Would be cool if there were official VS2012 starter kit and templates for different things out of the box. Like DotNetNuke and several others have.

    http://msdn.microsoft.com/en-us/library/vstudio/ms247121%28v=vs.110%29.aspx

  • Piedone said

    Have you published the template?

  • jlchereau said

    This checklist works for a simplistic display-only content part.

    I still struggle to find a simple tutorial/check list for a content part that submits content (create, update, delete) in the user front-end (not the admin dashboard).

  • jlchereau said

    I should add that the comments module has such a content part but it is fairly complex to dissect.

  • Piedone said

    Of course this checklist is for content part development, not for frontend content item management.

    Do you know the Training Demo module? https://orchardtrainingdemo.codeplex.com/ Its ContentsAdminController (https://orchardtrainingdemo.codeplex.com/SourceControl/latest#Controllers/ContentsAdminController.cs) contains a detailed example of how to manage content items. It's an admin controller but that only means it's only reachable from the dashboard: the techniques used are the same for the frontend.

  • hcalboru said

    Hi Piedone,

    I agree with jlchereau we need a "simple" demo module with CRUD operations on the front end. Especially with N-N relationship, and content2content relationship.

  • Piedone said

    Hi,

    really, take a look at the controller I linked. Although it's not "simple" (it not only contains the very basics but also some more complex querying) but it fully contains content item CRUD. As I mentioned, for the frontend nothing is different in these terms.

    Relationships are a bit tougher, especially if they should be versioned. If you don't want to store relationships yourself, I'd advise you to take a look at the Taxonomies module (now bundled with Orchard, in the latest source) or at Associativy: http://associativy.com/

    If you'd like some hands-on help we'd be happy to give you some online guidance or have peer programming sessions, see: http://english.orchardproject.hu/Training/

  • jlchereau said

    Could you recommend me a skilled Orchard developer as it might be more efficient to subcontract development? You can contact me at orchardproject[#!]@[#!|]memba.org.