Search code examples
orchardcmsorchardcms-1.8

Orchard.Layouts: How do you generate the "code" for a layout?


Using 1.9-int branch of Orchard.

In PageCommand.cs (Orchard.Pages) there is the following code:

layout =
                "{\"elements\": [{" +
                    "\"typeName\": \"Orchard.Layouts.Elements.Canvas\"," +
. . . .

When going to a Layout I created, I see no ability to get this code.

If I attach the Layout Part to a custom Content Type, there is a text area for the "default layout" which also has this element definition. So it seems I can change the definition in here, but again where can I generate it from a Layout I create?

Where can I generate this? I'd like to create a Command file to use in a Recipe and have it use a particular layout.

Thanks.


Solution

  • Did not realize that a simple Export of the Layout would provide the exact code that I needed.