Table of Contents

Class Meta

Namespace
Dynamicweb.Frontend
Assembly
Dynamicweb.dll
Represents the meta data of the pageview. Access through PageView.Current.Meta.
public class Meta
Inheritance
Meta
Inherited Members

Properties

IsXhtml

Gets or sets if the html is rendered as xhtml or html.
public bool IsXhtml { get; set; }

Property Value

bool

Remarks

Influences the markup of meta data. If true makes the tags self closing.

Title

Gets or sets the title of the page
public string Title { get; set; }

Property Value

string

Methods

Add(string)

[Obsolete("Use AddTag instead.")]
public void Add(string metatag)

Parameters

metatag string

Add(string, string)

[Obsolete("Use AddTag instead.")]
public void Add(string name, string content)

Parameters

name string
content string

AddTag(string)

Adds custom meta data tag to the pageview.
public void AddTag(string content)

Parameters

content string
The markup of the metatag - remember to check for isXhtml.

Examples

//Get current instance
    Dynamicweb.Frontend.PageView pv = Dynamicweb.Frontend.PageView.Current();

    Change properties on the PageView object
    if(pv.Meta.isXhtml){
    pv.Meta.Add("<meta name=\"Generator\" content=\"Dynamicweb 7\" />");
    }else{
    pv.Meta.Add("<meta name=\"Generator\" content=\"Dynamicweb 7\">");
    }

AddTag(string, string)

Adds meta data tag to the pageview in the format <meta name="{Name}" content="{Content}" />
public void AddTag(string name, string content)

Parameters

name string
content string

Examples

//Get current instance
    Dynamicweb.Frontend.PageView pv = Dynamicweb.Frontend.PageView.Current();

    Change properties on the PageView object
    pv.Meta.Add("Keywords", "keyword1, keyword2");
To top