Available shape types in Orchard

Topics: Writing modules
Jul 12, 2012 at 9:43 AM

Hi there,

I'm wondering what shape types are used in Orchard by default. I've already discovered "Document", "Content" and probably all the parts names (right?!). Are there any other shape types?

I need that information for my module I'm currently working on as it executes code depending on these types. Maybe there's a list somewhere which also shows the scope of each type?!


Jul 12, 2012 at 5:07 PM

There is no such list, sorry. It would be obsolete the minute it's written. The whole point of shapes is that they are easily created. What's your scenario?

Jul 12, 2012 at 7:31 PM
Edited Jul 14, 2012 at 7:51 AM

I’m working on a shape filter module that filters shapes’ content. And that filter will be configurable for different things like filtering by shape type. At the moment I have “Document”, “Content” and “Parts”. Last one is actually used to request the filter to search in a Parts array.

Soon that module is working I’ll add a second one that makes it possible to use insert tags in Orchard. Later it could also be used for a glossary module linking words to glossary entries and so on.

At the end the main target for the first/base module is to have an extension point for shape content manipulation at runtime.



Jul 12, 2012 at 8:33 PM

You shouldn't make assumptions on what shapes are available.

Jul 12, 2012 at 8:45 PM

The list of all available shapes is in IShapeTableLocator

Jul 12, 2012 at 9:10 PM

That list can't be exhaustive though.

Jul 12, 2012 at 10:06 PM

@tohms If you need to manipulate shapes try utilizing IShapeTableProvider - it's an extension point you should use to plug in to shape processing events (OnDisplaying, OnCreating/ed and so on) to alter shapes. Actually you don't need to know the whole list of those - just apply your custom logic to those that match your requirements (eg. a name matches something).

Look at the current implementations of IShapeTableProvider in core modules - it will give you more insight.

Jul 12, 2012 at 10:23 PM
Edited Jul 14, 2012 at 7:52 AM

Thank you all for the hints. I’ll have a look at the provider tomorrow and will see if that is what I was looking for.


Jul 14, 2012 at 10:27 AM

Hi guys,

I had a look into ITableProvider and it seems you pushed me into right direction. ITableProvider would really be the best choice for my filter module.

But for that I still need the available shape types so admin can select them in backend. So question is how to get those values? I've had a look into some Shapes implementing ITableProvider and I've seen something like:

public void Discover(ShapeTableBuilder builder) {

That "Content" part/name is actually what I like to get, so at the end I'll have a list of all available shapes that could be used to filter their content.

Is it clear what I try to realize?