Reputation: 2662
Since I never worked with Orchard CMS I have a SEO related question.. is it possible to have title of a page/ article like: title of a page/article | title of website | website url? Because what I have now is backwards order.. Tnx in advance
Upvotes: 1
Views: 78
Reputation: 89220
In your theme you need to overwrite Document.cshtml
The original can be found here:
~/Core/Shapes/Views/Document.cshtml
The title is added to the page using:
@{
var title = Convert.ToString(Model.Title);
var siteName = Convert.ToString(WorkContext.CurrentSite.SiteName);
var baseUrl = Convert.ToString(WorkContext.CurrentSite.BaseUrl);
}
@Html.Title(baseUrl, siteName, title)
You can add as many parameters in the Title helper method as you want and they will be shown separated by the separator specified in site settings. They are displayed in reverse order.
So:
<title>@Html.Title("Item 1", "Item 2", "Item 3")</title>
will be rendered in HTML as:
<title>Item 3 - Item 2 - Item 1</title>
Upvotes: 2