Can I write a Alternates for Document.cshtml

Topics: Core, Customizing Orchard
Nov 1, 2013 at 10:39 AM
Hi, I use the IShapeTableProvider to write a Document alternates for Document. But it still use the Theme default Documents.cshtml. Can I write a alternates for it? Thanks.
            builder.Describe("Document")
                .OnCreated(created =>
                {
                    var content = created.Shape;
                    content.Child.Add(created.New.PlaceChildContent(Source: content));
                })
                   .OnDisplaying(displaying =>
                       {
                           var workContenxt = _workContextAccessor.GetContext();
                           if (IsAdvanceMode(workContenxt))
                           {
                               //For Advanced edit mode
                               displaying.ShapeMetadata.Alternates.Add("Document_AdvanceEditMode");
                           }
                       })
                   .From(feature);
Developer
Nov 1, 2013 at 11:21 AM
Edited Nov 3, 2013 at 10:45 PM
Unfortunately you can't AFAIK. The Document shape is really a wrapper around the Layout shape, and wrappers can't have alternates. But the Document should really contain the very basic frame for a website thus most of the time you wouldn't need alternates for that anyway.

What is in the alternate that differs from the default template?
Developer
Nov 3, 2013 at 10:45 PM
Thanks to Piotr now actually you can write alternates for wrappers too! The patch is in the latest source and will be part of the next release.