Hi,
I trying to add a noindex,nofollow metatag to some pages through a custommodule:
Dynamicweb.Frontend.PageView.Current().Meta.MetaTags.Add("robots", "noindex,nofollow");
I can easily add a new description- or title-tag with the above code.
But its not working with the robots-tag.
How come? Anyone with a quick-fix?
/Morten
Developer forum
E-mail notifications
Robots metatag overwrite?
Morten Smedegaard Hvid
Posted on 30/01/2012 08:41:34
Replies
David Matheson
Posted on 30/01/2012 08:49:17
Hi Morten,
Not a fix, but in Dynamicweb 8 you can set noindex,nofollow on individual pages under Properties.
The attached file shows new functionality included in Dynamicweb 8.
David
Not a fix, but in Dynamicweb 8 you can set noindex,nofollow on individual pages under Properties.
The attached file shows new functionality included in Dynamicweb 8.
David
Morten Smedegaard Hvid
Posted on 30/01/2012 09:34:37
Damn ... so there is no fix i DW7? The solution runs on 19.2.5.2...
I dont want to add the tag for a given page. What im looking for is a way to add the tag, on a news-detailpage in a given category.
Dont understand why it not working - Nicolai mentioned the fix back in '08:
http://developer.dynamicweb-cms.com/forum.aspx?PID=48&ThreadID=20752
Nicolai Høeg Pedersen
Posted on 30/01/2012 09:36:39
This post has been marked as an answer
@Morten. You have a minor glitch in your code:
You wrote:
And it should be:
You wrote:
Dynamicweb.Frontend.PageView.Current().Meta.MetaTags.Add("robots", "noindex,nofollow");
Dynamicweb.Frontend.PageView.Current().Meta.Add("robots", "noindex,nofollow");
Votes for this answer: 1
Morten Smedegaard Hvid
Posted on 31/01/2012 07:59:58
@Nicolai: Thanks ... :)
Note-to-self: Remember to include metatags on your xslt master template... doo
Note-to-self: Remember to include metatags on your xslt master template... doo
You must be logged in to post in the forum