Nop4.2, Set default title, then the all category, product , other page will add it

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 years ago
Nop4.2, Set default title, the all category, product page add it, if can't set, the Home page title is empty. Please help how to fix this?
4 years ago
Hello greatosale1.

From your post it's not very clear which are the exact elements you can't set.

In general all titles and text elements are manageable through the administration of your website. Some are set via string resources and are a part of your language pack, others are set in the catalog administration, or topics administration, etc. The "home page text" title for example is set in the topics administration.

Please refer to the nopCommerce documentation for more detailed information.

Regards
/ Hristo
4 years ago
Nop-Templates.com wrote:
Hello greatosale1.

From your post it's not very clear which are the exact elements you can't set.

In general all titles and text elements are manageable through the administration of your website. Some are set via string resources and are a part of your language pack, others are set in the catalog administration, or topics administration, etc. The "home page text" title for example is set in the topics administration.

Please refer to the nopCommerce documentation for more detailed information.

Regards
/ Hristo


Admin here:

Settings--General settings --- SEO---
Default page title
Page title SEO adjustment: Store name comes after page name
Page title separator
Default meta keywords
Default meta description


If I set default page title, all page will add it in the title in the end, if leave it empty, the home page meta title is empty.
4 years ago
greatosale1 wrote:
Hello greatosale1.

From your post it's not very clear which are the exact elements you can't set.

In general all titles and text elements are manageable through the administration of your website. Some are set via string resources and are a part of your language pack, others are set in the catalog administration, or topics administration, etc. The "home page text" title for example is set in the topics administration.

Please refer to the nopCommerce documentation for more detailed information.

Regards
/ Hristo

Admin here:

Settings--General settings --- SEO---
Default page title
Page title SEO adjustment: Store name comes after page name
Page title separator
Default meta keywords
Default meta description


If I set default page title, all page will add it in the title in the end, if leave it empty, the home page meta title is empty.


It is by design.
Please see the code(If you have source code) of Presentation==>Nop.Web.Framework==>UI==>LayoutExtensions
then
Presentation==>Nop.Web.Framework==>UI==>PageHeadBuilder
also see the Presentation==>Nop.Web==>Views==>Shared==>_Root.Head.cshtml

you can write your own extension method for homepage like NopTitleForHomePage and can add a new layout for the home page then call this method.
4 years ago
Thank you.
4 years ago
I set  @Html.NopTitle(false) in root.head.cshtml, add false.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.