This project is read-only.

Changing the Display Order of rows on the Blog Detail page

Topics: Customizing Orchard
Aug 2, 2011 at 4:23 AM

On my blog detail page in Orchard I have the blog post itself rendering on the page first, then the comments list, then the new comment form, and then the tags the post is tagged with. How do I change the display order of these rows for the blog post detail page? I'd like to have the tags for the blog post before the comments but I'm not sure where this is managed.

Thanks for listening,


Aug 2, 2011 at 5:54 AM

You need to look into

Aug 2, 2011 at 4:30 PM
Edited Aug 2, 2011 at 4:31 PM

I've read that piece of documentation and checked the file of the blog module and my theme but it was still not clear to be how I could move the tags row of the blog detail page to be before the comments rows. The file at the root of the Orchard.Blogs module looks like:

    <!-- available display shapes -->
        Parts_Blogs_BlogPost_List -> when in the blog detail display the blog post list is currently hard-coded to Content:5 to enable the current state of blog paging
    <!-- widget and edit shapes just get default placement -->
    <!-- edit "shapes" -->
    <Place Parts_Blogs_Blog_Fields="Content:2"/>
    <Place Parts_Blogs_BlogArchives_Edit="Content:5"/>
    <Place Parts_Blogs_RecentBlogPosts_Edit="Content:5"/>
    <!-- widgets -->
    <Place Parts_Blogs_BlogArchives="Content"/>
    <Place Parts_Blogs_RecentBlogPosts="Content"/>
    <!-- default positioning -->
    <Match ContentType="Blog">
        <Match DisplayType="Detail">
            <!-- blog posts currently added to the blog within the controller into Content:5 <Place Parts_Blogs_BlogPost_List="Content:5" /> but...
                 ...placing it in in the Content zone as it's currently implemented to light up the RSS feed for the blog... -->
            <!-- Parts_Blogs_RemotePublishing is made available with the "Remote Blog Publishing" feature -->
            <Place Parts_Blogs_BlogPost_List="Content"
        <Match DisplayType="DetailAdmin">
            <Place Parts_Blogs_BlogPost_List_Admin="Content:5"
        <Match DisplayType="Summary">
            <Place Parts_Blogs_Blog_Description="Content:before"
        <Match DisplayType="SummaryAdmin">
          <Place Parts_Blogs_Blog_SummaryAdmin="Actions:10"/>
          <Place Parts_Blogs_Blog_Description="Content:before"/>


And my theme's file looks like:

  <!-- Customize where the shapes are rendered -->
  <Match Path="/">
    <Place Parts_Tags_ShowTags="Content:before"
  <Match ContentType="BlogPost" Path="/blog/*">
  <Match Path="/About">
    <Place Parts_Common_Metadata="-"/>


I see views in the comments module called ListOfComments.cshtml and Parts.Comments.cshtml but when I add attributes to the Place node under <Match ContentType="BlogPost"> it doesn't seem to move those rows around.


Aug 2, 2011 at 10:01 PM

Try using explicit numbers or dotted number sequences rather than before and after.