Recent Posts and Articles
This post explains how to use parameterized snippets with Orchard.Layouts, and is taken from a little book I'm writing on the Orchard.Layouts module.
- 00:00 - Agenda.
- 02:16 - Status: merged PRs, bugfixes. Azure AD integration incoming!
- 10:19 - Demo by Lombiq - Lombiq.Fields open-source module. Contains the MoneyField (using Money.NET) and the MediaLibraryPickerField for uploading files using a content item editor (including frontend), both with various settings for customization. Links: Git repo, Mercurial repo.
- 21:21 - Demo by Sébastien - the new Orchard Gallery is in production! You can filter the list packages on the Admin UI to see your own packages.
- 29:16 - Demo by Sébastien - Orchard 2 updates:
- Layout shape is now called ThemeLayout ("Layout" is a View property used by Razor).
- Layout.Header is now called using RenderSectionAsync (not the default Razor method, but it's overridden by Orchard)
- Document shape is no more, it's content is now in Layout.
- The pipeline for displaying a content item is much more effective. Sébastien's local machine runs 700 requests / second with 20 ms response time.
- 41:34 - To build the Admin UI, Orchard 2 needs user management. Discussion on possible identity providers and other Orchard 2 topics.
- 53:18 - Discussion about an issue and open PR about using NuGet instead of the lib folder.
- 57:34 - Questions by Matt, who's new to Orchard - answers by Sébastien.
- 00:00 - Recap of the last meeting and agenda.
- 04:33 - Status:
- Configurable Layout Snippets
- Amaretti Admin theme
- Discussion: lib folder vs. NuGet.
- PR for optimizing the loading of ShellStateRecords.
- ContentItem.Content property to dynamically read a ContentItem's properties.
- Fixed import-export for NavigationQueryMenuItems and BlogArchives widgets.
- Theme dependecies are now correctly handled as for modules.
- 29:26 - Demo by Sébastien - The new Orchard Gallery is almost production-ready (public preview): support for screenshots added.
- 33:30 - Demo by Sébastien - Orchard 2 updates:
- Nick imported over most of the Recipes module.
- Sébastien improved the Shape Tag Helpers so shape properties can be proxied (and documented) in a TagHelper for IntelliSense support (instead of e.g. using a separate ViewModel class).
- The Orchard 2 type system brings many changes for more freedom:
- A ContentItem is a limitless JSON object tree with dynamic bindings, but you can access properties statically too.
- Drivers are not required to have static binding anymore to a Part or Fields as they can manipulate any part of a content item now (see Orchard.Indexing.Settings.EditorEvents for a similar example in Orchard 1).
- ContentElement is a new parent type for any level of content-related type (Field, Part, Item).
- Content Fields and Parts still exist, but due to the dynamic nature of Content Items in Orchard 2, they only serve as helpers/conventions (thanks to their static typing) for adding properties to a Content Item and they behave the same way as in Orchard 1, but you can create your own conventions.
- In Orchard 1, ContentItem.Content is a dynamic property that will get the statically typed representation of a Field/Part using reflection. In Orchard 2, ContentItem.Content will access an internal field of the type JObject (which is the deserialized tree of data of the content item).
- Modifying content elements is different from Orchard 1 (modifications to a property in a reference of a Content Part automatically updates the Content Item): in Orchard 2 you need to weld (Weld<T>()) back the modified content element to the content item or alter the content item (Alter<T>()) and define the changes in an action.
- Next steps: Theming engine (mostly 1-1 port from Orchard 1)
- 00:00 - Agenda.
- 01:31 - Elections: the number of people voted has dropped since last year. There is a tie on the 5th place, so the Steering Committee has 6 members for the next year: Benedek, Bertrand, Piotr, Sébastien, Sipke, Zoltán. The Steering Committee elected Sipke to be the new Benevolent Dictator, so he will have a test drive of this position next week.
- 04:57 - Discussion regarding an issue on GH related to the new Resources module. People should submit suggestions for discussion as issues on GitHub, so they can be discussed in their absence too. Orchard's Gitter channel has a nice traffic.
- 30:30 - Status. A bunch of bugfixes and PRs. Márk from Lombiq is the newest member of core contributors for Orchard.
- 43:48 - Demo by Sipke - Layouts Snippets improvements: a snippet is a Layout element that corresponds to a template file and is resolved dynamically based on the naming convention that the file name should end with "Snippet", e.g. "SipkeIsTheNewDictatorSnippet.cshtml". The addition is that now you can parameterize/configure them (by providing values in the Layout editor). Sipke also explained some interesting technical details about Layouts.
- 51:43 - Demo by Sébastien - Orchard 2 improvements: all data can now be stored in a DB (SQL Server). Lightning DB support also added (one file, memory-mapped, super fast). Content* classes stripped down, there's also ContentItem, which is a specific document, so different versions of a content item are actually separate ContentItem instances (= separate documents) connected by a common ContentItemId property - this also leads to significant simplifications in the Content Manager and content items (being pure POCO) can now be cached directly. Sébastien and Taylor are working on a clever way to use shapes mixed with Tag Helpers (check out the relevant presentation from Harvest).
- 00:00 - Recap of last week's meeting.
- 02:46 - Agenda.
- 03:46 - Elections: votes are closed, results to be announced soon. Benevolent Dictator will be chosen next week.
- 06:25 - Status.
- 15:05 - Demo by Sipke: a new ElementHarvester implementation to be able to add Widgets to the Layout editor.
- 38:10 - Orchard 2 updates by Sébastien.
How to create a custom slider form element? There are several moving parts and it gets even more interesting when you develop custom validators and binders along with it. Developing form elements is somewhat like developing custom layout elements but a bit more involved.