[email protected] wrote:It seems the ContactUs page (System Name) will always use the store SEO rather than specified SEO.
Has anyone else noticed this?
I noticed when you customize this page you get an URL like this
/contactus-2
Which if you go to directly shows the correct SEO.
However if you go to
/contactus
You see the content that you edited along with the form but no customized SEO.
Here's what I did to have special meta description and meta keywords on my contact page:
On the /Views/Shared/_Root.Head.cshtml (or same file, but in your custom theme folder):
I replaced this:
<meta name="description" content="@(Html.NopMetaDescription())" />
<meta name="keywords" content="@(Html.NopMetaKeywords())" />
with this:
@if (Model.Title == "Contact Us")
{
<meta name="description" content="Your static text goes here..." />
<meta name="keywords" content="these,are,keywords,here," />
}
else
{
<meta name="description" content="@(Html.NopMetaDescription())" />
<meta name="keywords" content="@(Html.NopMetaKeywords())" />
}
It will work in version 3.40..I have not tested in other versions, but it will probably also work in other versions. Just be sure to use whatever your actual title is for the ContactUs topic page.