Developer forum

Forum » Development » Change meta from custom module

Change meta from custom module


Reply
Hi

Can I change/add/mimic <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"> from inside a custom module so I can supply an option of not allowing crawling on seletive pages?

- Lars
 

Replies

 
Nicolai Høeg Pedersen
Reply
Hi Lars

Yes you can...

This piece of code will add or overwrite the Robots meta tag:
PageView.Current.Meta.Add("robots", "noindex,nofollow").

 

You must be logged in to post in the forum