Contents tagged with Orchard

  • Upgrading Orchard 1.7 to 1.8 - Add That User!

    My blog has been revived, on Orchard instead of Wordpress (mainly because, well, I like having the option of jumping into the CMS code and ripping it to pieces if I so desire). It'd been sitting around on 1.7 for a while, but I finally moved all the old posts and upgraded to 1.8. It's all very painless; but if you don't want to be poking around updating entries in the .sdf, then make sure you … more

  • Orchard CMS: HQL, Or How To Query Based On Content Fields

    I know, I know; you're thinking - "Why do I even need to write my own queries, when there's a perfectly awesome Query and Projection module in Orchard I can leverage? Well, if you're building an event calendar, for example, you might want to generate your queries on the fly based on query string parameters; in which case, I don't know if creating a bunch of Query items is the nicest way to go. ( … more

  • Orchard CMS: Using A Static ViewModel For Your Driver Display Method

    If you look at all the documentation about rendering shapes in Orchard, you'll see that while the Model for the partial view gets specified for the Editor methods (via shapeHelper.EditorTemplate()), all the examples I came across for Display relied on a dynamic method and generated model. For example: protected override DriverResult Display( MapPart part, string displayType, dynamic … more

  • Orchard CMS: How To Create Content In Your Module Migrations.cs

    While I'm on an Orchard streak, here's something else that I felt sounded easy on paper, but wasn't well documented. In the form of a question - "How can I create content (pages, widgets, whatever) when my module is activated?" To create all content (which again makes judicious use of dynamic objects, since Orchard has no idea what sort of content is being created at compile time / the … more

  • Orchard CMS: Conditional Field Rendering

    Following the theme of "wow, that should be easy, but it's not as fast or easy as you'd think", here's my post / answer to the question "How can I show / hide a field on a content type based on the value of another field"? If you've read about shapes in Orchard, and how they combine with the placement.info file to generate the output of your page, you'll quickly realise that what you really want … more

  • Orchard CMS: Adding a field to a custom content type in your module / migrations.cs

    While it sounds simple, I didn't quite find all the documentation I needed in once place, and there were a few gotchas, so I thought I'd make a post (if only for my own future reference). A few notes on fields, content types and content parts before we continue: When we add a field to a content type via the Admin Interface in Orchard, it looks nice and independent, but in the background all … more

  • Orchard CMS: Planting My First Orchard

    Tried to set up Orchard CMS today, and went a little bit crazy trying to get it to run; even though in the end, none of the problems turned out to be very difficult. First of all, it just kept throwing back 500 Server codes; so to see what's actually going wrong, head into Orchard.Web, edit the Web.config and make sure: in system.WebServer you have <httpErrors errorMode="Detailed"/> (and … more

  • 1