Title from SEO is not shown for all Topics

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 năm cách đây
v 2.10
Title is not shown for topics that are rendered with TopicBlock.cshtml.
It is critical for HomePageText topic.
The code for topicblock.cshtml should be

else
{
        Html.AddTitleParts(!String.IsNullOrEmpty(Model.MetaTitle) ? Model.MetaTitle : Model.Title);
        Html.AddMetaDescriptionParts(Model.MetaDescription);
        Html.AddMetaKeywordParts(Model.MetaKeywords);
    <div class="htmlcontent">
        @if (!String.IsNullOrEmpty(Model.Title))
        {
            <div class="htmlcontent-title">
                <h2 class="htmlcontent-header">
                    @Model.Title</h2>
            </div>
            <div class="clear">
            </div>
        }
        <div class="htmlcontent-body">
            @Html.Raw(Model.Body)
        </div>
    </div>
}
12 năm cách đây
It's by design. Titles should not be rendered for blocks (TopicBlock.cshtml). Titles are rendered only for the entire pages (TopicDetails.cshtml)
12 năm cách đây
a.m. wrote:
It's by design. Titles should not be rendered for blocks (TopicBlock.cshtml). Titles are rendered only for the entire pages (TopicDetails.cshtml)

It should but it doesn't!
If I write smthing in homepagetext topic in SEO tab it wouldn't be shown on main page!
12 năm cách đây
Or tell me how can I set title for main page?
12 năm cách đây
1. Open \Presentation\Nop.Web\Views\Home\Index.cshtml file
2. Add the following code after initiating 'Layout' property
Html.AddTitleParts("My home page title");
12 năm cách đây
Am - what your saying here doesn't make it dynamic though, if we build this and have an SEO guru work on the site, he/she needs to be able to edit the homepage title/meta details via the admin area and the topics is the most obvious place to do this...?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.