Recent Posts and Articles
If you have some experience with Orchard, but still feel a bit shakey when it comes to shapes, then this post is for you. We will see how a request comes in, how a content item is rendered, where drivers and placement fit into the picture, and how a resulting shape is turned into HTML to be sent down the wire.
Querying over records is nice, but if those records are part records, you need to be really careful and check that they correspond to a real content item, that his content hasn’t been archived, and that its publication state is what you need it to be. In order to do that, you’ll have to join with ContentItemRecord and ContentItemVersionRecord. But how do you express joins in HQL in a way that works with Orchard records?
Orchard has two APIs on IContentManager to query content items: Query, and HqlQuery. Query is the older API, but it’s also the simplest. It’s great when you want to perform a simple query such as “get all content items with part TitlePart where the title begins with A”. HqlQuery is a little more advanced, closer to nHibernate APIs, and allows for more complex queries.
For a few versions now, Orchard has been treating media (images, videos, etc.) as content items. There is a special kind of field, MediaLibraryPickerField, that enables you to add images, or collections of images, to any content type
- Status: Alias lookup performance issue fixed, fixed a possible NRE during setup, fixed a possible OoME when using Shape Tracing, the command line tool now supports empty strings as parameters, ReliableSqlConnection removed (since auto-retry happens by default), Sipke and Nick are working continuously on their respective feature branches, TinyMCE updated to 4.1.5.
- Sébastien is working on the issue with DateTime-type CommonPart properties saved with different precision in infoset and records.
- Demo by Nick - Localization updates: huge clean-up and refactoring in the AdminController of Orchard.Localization (handling the localization of content items) and improved/added other features of this module.
- Demo by Sipke - Layouts - Element Blueprints: it adds the ability to create reusable content of any kind on different parts of your website.
- Abhishek, the most active contributor to the documentations has now write access to the documentation repository!
- Shaun is working on extension methods for the ContentDefinionManager to ease the creation of content fields.
- Status: not much happened during the week, due to an Azure hackathon in Microsoft. Owin branch is updated, Nick is working on the Localization branch, TinyMCE updated to 4.1.4 and all available plugins were added in a separate feature.
- Nick updated the Inline Editing module with some UI changes and TinyMCE support.
- A bit of live troubleshooting on Sébastien's machine to solve an issue where running 1.x fails with an YSOD after updating from the Owin branch with the help of Nick. Temporary ASP.NET files should be cleaned (x86 and x64 too).
- After a long time, we did bug triage on the regular meeting too!
Orchard uses dynamic objects called shapes as view models. It happens commonly that you’ll want to use strongly-typed HTML helpers such as Html.TextBoxFor from within a shape’s template. What if now, my model has some properties that are what I’m really interested in, and that are of a known strong type?