How to enable default seo tags only to home page?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 yıl önce
hi  how to add default seo tags only to home page. not to other emty seo tag pages.
11 yıl önce
SEO tags? do you mean meta keywords and meta description?
11 yıl önce
yes. title , meta keywords and meta description. i am using nopCommerce 2.6
11 yıl önce
Use the follow methods in \Nop.Web\Views\Home\Index.cshtml file
Html.AddTitleParts("");
Html.AddMetaDescriptionParts("");
Html.AddMetaKeywordParts("");

P.S. Nop.Web.Extensions namespace
11 yıl önce
How to add this?

I have a page that i created and in Index.cshtml should i do like this ?

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_ColumnsOne.cshtml";
}

Html.AddMetaKeywordParts("ipod, ipad,");

This is not working..

if we want to add SEO keywords and description to any page, how to add it ?
11 yıl önce
pepper wrote:
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_ColumnsOne.cshtml";
}

Html.AddMetaKeywordParts("ipod, ipad,");


@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_ColumnsOne.cshtml";

    Html.AddMetaKeywordParts("ipod, ipad,");
}
11 yıl önce
thank you :)
11 yıl önce
a.m. wrote:


@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_ColumnsOne.cshtml";

    Html.AddMetaKeywordParts("ipod, ipad,");
}


What about this ? P.S. Nop.Web.Extensions namespace

what does this has to do with this ? any more changes or addition for adding meta keywords and description on a page ?
11 yıl önce
pepper wrote:
What about this ? P.S. Nop.Web.Extensions namespace

what does this has to do with this ?

Add
using Nop.Web.Extensions

to the cshtml file
11 yıl önce
So this is what I have added

@using Nop.Web.Extensions;
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_ColumnsOne.cshtml";

    Html.AddMetaDescriptionParts("ipod, ipad, iphone");
    Html.AddMetaKeywordParts("Products like ipod, itouch, ipad, new ipad");
  
    
}

But when i see source in IE, i still see meta keywords and desc for website SEO that i added in administration but i don't see the keywords that i am trying to add for this page only WHY ?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.