OrchardCMS / OrchardDoc

Documentation for Orchard 1.x (not Orchard Core, for that see https://docs.orchardcore.net/).
http://docs.orchardproject.net
142 stars 241 forks source link

Two calls Html.Title affects each other #166

Closed musukvl closed 9 years ago

musukvl commented 9 years ago

Code sample:

@{
    string title = "Title";
    string siteName = "Site";
}
<meta property="og:title" content="@Html.Title(T(title).ToString(), T(siteName).ToString())" />
<title>@Html.Title(T(title).ToString(), T(siteName).ToString())</title>

makes:

 <meta property="og:title" content="Site - Title" />
 <title>Site - Title - Site - Title</title>

Because @Html.Title reuses same instance of IPageTitleBuilder. So PageTitleBuilder.AddTitleParts collects title parts for all @Html.Title calls.

For Orchard CMS 1.8.2

abhishekluv commented 9 years ago

This is the bug database for the documentation.

Please ask such questions here : https://github.com/OrchardCMS/Orchard/issues

musukvl commented 9 years ago

Thanks, I moved it to /OrchardCMS/Orchard/issues so you can delete this issue.