Block area placement

I have the following zone in my layout file:

@Display(Model.Blog) 

I want to always display my list of blog posts in this zone, so I edited the placement.info file as follows:

 <Place Parts_Blogs_BlogPost_List="Blog"/> 

Parts.Blogs.BlogPost.List.cshtml lives in the catalog of representations of my theme.

I can not get the blog to render. If you change the name of the zone to "Content", it will work ....

Update

In place.info in the directory of my themes directory:

  <Place Parts_Blogs_BlogPost_List="/BlogZone"/> 

In my layout.cshtml

 @if (Model.Content != null) { <div id="content"> <div class="container"> @Display(Model.Content) </div> </div> } @if (Model.BlogZone != null) { <div id="content">blog zone <div class="container"> <div class="row-fluid"> <h2 class="title-divider"><span>Company <span class="de-em">Blog</span></span> <small>We love to talk!</small></h2> </div> <div class="row"> <!--Blog Roll Content--> <div class="span9 blog-roll blog-list"> @Display(Model.BlogZone) </div> </div> </div> </div> } 

The Parts_Blogs_BlogPost_List part is still displayed inside the Content area.

+6
source share
1 answer

Type /Blog instead of Blog in the placement.info file.

The previous slash tells Orchard that you mean the global zone (from the Layout.cshtml file), and not the local one (each element has a local content area, header, footer, etc.). There is no such thing as a local Blog zone - why don't you see anything.

UPDATE: You also need to specify a position. /BlogZone:before or /BlogZone:2 etc.

+2
source

All Articles