Contents tagged with Clay
-
On accessing chains of potentially null properties
Raise your hand if you’ve ever written code looking like this:
-
Writing an unthemed view while still using Orchard shapes and helpers
This quick tip will show how you can write a custom view for a custom controller action in Orchard that does not use the current theme, but that still retains the ability to use shapes, as well as zones, Script and Style helpers.
-
So what are zones really?
There is a (not so) particular kind of shape in Orchard: zones. Functionally, zones are places where other shapes can render. There are top-level zones, the ones defined on Layout, where widgets typically go, and there are local zones that can be defined anywhere. These local zones are what you target in placement.info.
-
Creating shapes on the fly
Most Orchard shapes get created from part drivers, but they are a lot more versatile than that. They can actually be created from pretty much anywhere, including from templates. One example can be found in the Layout.cshtml file of the ThemeMachine theme:
WorkContext.Layout.Footer
.Add(New.BadgeOfHonor(), "5");What this is really doing is create a new shape called BadgeOfHonor and injecting it into the Footer global zone (that has not yet been defined, which in itself is quite awesome) with an ordering rank of "5".
-
Dispatching Orchard shapes to arbitrary zones
In my LIDNUG demo last week, I showed an interesting technique that I know some people will want to apply to their own stuff.
-
Switching the layout in Orchard CMS
The UI composition in Orchard is extremely flexible, thanks in no small part to the usage of dynamic Clay shapes. Every notable UI construct in Orchard is built as a shape that other parts of the system can then party on and modify any way they want.
-
A quick look at what’s new in Orchard 0.8
We shipped Orchard 0.8 on Monday and it’s the last release we will make before 1.0, which is scheduled for January 2011. We think it’s a pretty nice release in that it wraps up the UI story for the platform.
-
Clay: malleable C# dynamic objects – part 2
In the first part of this post, I explained what requirements we have for the view models in Orchard and why we think dynamic is a good fit for such an object model.
-
Clay: malleable C# dynamic objects – part 1: why we need it
When trying to build the right data structure in Orchard to contain a view model to which multiple entities blindly contribute, it became obvious pretty fast that using a dynamic structure of sorts was a must.