Developer forum

Forum » Development » Robots metatag overwrite?

Robots metatag overwrite?

Morten Smedegaard Hvid
Reply
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



Replies

 
David Matheson
Reply
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
dw8-page-properties.png
 
Morten Smedegaard Hvid
Reply

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
Reply
This post has been marked as an answer
@Morten. You have a minor glitch in your code:

You wrote:
Dynamicweb.Frontend.PageView.Current().Meta.MetaTags.Add("robots", "noindex,nofollow");
And it should be:
Dynamicweb.Frontend.PageView.Current().Meta.Add("robots", "noindex,nofollow");


Votes for this answer: 1
 
Morten Smedegaard Hvid
Reply
@Nicolai: Thanks ... :)

Note-to-self: Remember to include metatags on your xslt master template... doo

 

You must be logged in to post in the forum