AI OnAI Off
A common way is to add the MetaDescription to a super class of your page type class.
For example
public abstract class SitePageBase : PageData
{
[Display(
GroupName = Global.GroupNames.MetaData,
Order = 100)]
[CultureSpecific]
[UIHint(UIHint.Textarea)]
public virtual string MetaDescription { get; set; }
}
And in your layout where you have the <head> area, you simply write
<meta name="description" content="@Model.CurrentPage.MetaDescription" />
Or if your model accually is the Page you'll write @Model.MetaDescription
So I want to send my property :
[Display(
GroupName = Global.GroupNames.MetaData,
Order = 100)]
[CultureSpecific]
[UIHint(UIHint.Textarea)]
public virtual string MetaDescription { get; set; }
to my view as a meta tag.. any idea on how to do this?
I'm a bit confused about this...