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.
Hace 11 años
hi  how to add default seo tags only to home page. not to other emty seo tag pages.
Hace 11 años
SEO tags? do you mean meta keywords and meta description?
Hace 11 años
yes. title , meta keywords and meta description. i am using nopCommerce 2.6
Hace 11 años
Use the follow methods in \Nop.Web\Views\Home\Index.cshtml file
Html.AddTitleParts("");
Html.AddMetaDescriptionParts("");
Html.AddMetaKeywordParts("");

P.S. Nop.Web.Extensions namespace
Hace 11 años
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 ?
Hace 11 años
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,");
}
Hace 11 años
thank you :)
Hace 11 años
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 ?
Hace 11 años
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
Hace 11 años
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.