Blog post - add hyperlink back to Blog list

Topics: Customizing Orchard
Mar 30, 2014 at 11:29 PM
Edited Mar 30, 2014 at 11:39 PM

Is there a simple way using the overrided view/shape Content-BlogPost.cshtml to add a hyperlink at the bottom of the post that routes back to the blog list page.

So you can click through to a blog post and have a link back to the list

When I add custom code to Content-BlogPost.cshtml it also shows up on the blog list page as well. I have also overrided that shape with Parts.Blogs.BlogPost.List.cshtml but it seems Content-BlogPost.cshtml affects both the list and the bolg post?

Is this possible using the code below?

@using Orchard.Utility.Extensions;
if (Model.Title != null) {
    Layout.Title = Model.Title;


var contentTypeClassName = ((string)Model.ContentItem.ContentType).HtmlClassify();

var tag = Tag(Model, "article");
    @if (Model.Meta != null) {
        <div class="metadata">
@if(Model.Footer != null) {
Mar 31, 2014 at 10:32 PM
Create an alternate called Content-BlogPost.Detail.cshtml - That way it wont show in the List.

FYI: The list view shows the Summary view of the BlogPost, not the Detail view.
Apr 10, 2014 at 2:04 PM
thanks all fixed using that alternate