shape tracing ?

Topics: Customizing Orchard
May 24, 2013 at 2:22 PM
Edited May 24, 2013 at 2:30 PM
I alternate all bunch of layers for list/pages rendering from zone to parts_common_body with most specific templates.
Everything works just fine, but for Content and List shapes Shape Tracing is confusing me with most general templates showing them as actives. All layers are wrapped with div.
And why by default List has only one alternate based on url (that is not good to me) but for one based on list type ?
Developer
May 25, 2013 at 12:13 AM
What do you mean with "layers"? --> "All layers are wrapped with div".

What other alternates would you need for a List shape besides url? Perhaps there are modules providing that. If not, you could write an IShapeTableProvider implementation, adding alternates for the List shape based on anything you need.
May 25, 2013 at 3:32 PM
Edited May 25, 2013 at 3:35 PM
sfmskywalker wrote:
What do you mean with "layers"?
Layer - stage - enclosure - nested level, whatever . I am not good at terminology :)
Zone[content] --> Content --> Parts_Container_Contained --> List --> Content --> Parts_Common_Body_Summary
"All layers are wrapped with div".
<div>
@Display(Model.Content)
</div>
If I remove all block (div) the layer disappears and it's information is shifted up to one layer
What other alternates would you need for a List shape besides url? Perhaps there are modules providing that. If not, you could write an IShapeTableProvider implementation, adding alternates for the List shape based on anything you need.
I try to avoid alternate based on url. I use only alternates based on content types. As for me Url is prerogative of Orchard-layers (ruls)
For sape List, I want by defaul this :
    ShapeMetadata metadata = Model.List.Metadata;
    string alternate = metadata.Type + "__" + Model.ContentItem.ContentType;
    
    metadata.OnDisplaying(ctx =>
    {
    metadata.Alternates.Add(alternate);
    });
May 25, 2013 at 3:51 PM
Is it possible for wrapping layers use pseudo tags ?
<!--orchard-pseudo-tag-for-shape-tracing-begin-->
@Display(Model.Content)
<!--orchard-pseudo-tag-for-shape-tracing-end-->