This project is read-only.

"Ad hoc Shapes" via

Topics: Customizing Orchard, General, Writing themes
Jun 21, 2011 at 9:33 PM

Is it possible to insert "ad hoc shapes" via the file?  For example, in TheThemeMachine layout view, there's a couple lines as follows: 

WorkContext.Layout.Header.Add(New.Branding(), "5"); // Site name and link to the home page
WorkContext.Layout.Footer.Add(New.User(), "10"); // Login and dashboard links

Would it be possible to do something like this:

<Place Branding="Header:5"/>
<Place User="Footer:10"/>
I specifically am wanting to do this on a specific page, so I would be using match rules.

Jun 21, 2011 at 10:01 PM

No, placement is for what's in content items. What you can do on the other hand is create your own equivalent that you would use from the code that inserts the shape into the tree. I did that on my "Buy from Amazon" module: I have settings for where to place the shape.