Search code examples
orchardcmsorchard-modules

adding 'share this' to the bottom of orchard CMS blog posts


Any advice on how / or where I can include the 'share this' script so I can include social sharing buttons at the bottom of my Orchard CMS blog posts. Ideally I would not use the gallery or any installer, simply just the classic implementation -- which I have done before, but I am not sure in which file I can add my script in Orchard's MVC architecture.


Solution

  • Use Shape Tracing, to identify the different templates that build up a Blog Post. Some of those templates are shared throughout the app, so learn also about Alternates.

    Look at ~/Common/Views/Parts.Common.Metadata.cshtml To override this view, you should copy it to your Themes Views folder, and modify as you wish. If you wish to modify this template only for blog post, name your new file Parts.Common.Metadata-BlogPost.cshtml in the themes views folder. This is an Alternate and BlogPost tell Orchard to use this template only with content types that are BlogPosts.