Class Meta
- Namespace
- Dynamicweb.Frontend
- Assembly
- Dynamicweb.dll
Represents the metadata of the page view. Access through PageView.Current.Meta.
public class Meta
- Inheritance
-
Meta
- Inherited Members
Properties
BaseHref
Gets or sets the base href of the page.
public Uri? BaseHref { get; set; }
Property Value
Canonical
Gets or sets the canonical URL of the page.
public Uri? Canonical { get; set; }
Property Value
Description
Gets or sets the meta description of the page.
public string? Description { get; set; }
Property Value
Keywords
Gets or sets the meta keywords of the page.
public string? Keywords { get; set; }
Property Value
Robots
Gets or sets the robots meta tag of the page.
public string? Robots { get; set; }
Property Value
Title
Gets or sets the title of the page.
public string? Title { get; set; }
Property Value
- string
E.g.
"Page title"
.
Methods
AddCustomTag(string)
Adds custom meta tag markup to the page view.
public void AddCustomTag(string content)
Parameters
content
stringThe markup of the meta tag.
AddOpenGraphTag(string, string?)
Adds an Open Graph tag to the page view in the format <meta property="og:{Name}" content="{Content}" />.
public void AddOpenGraphTag(string property, string? content)
Parameters
property
stringThe Open Graph property name (without "og:").
content
stringThe content of the Open Graph tag. If the content is an image (e.g. /files/system/opengraph.jpg), the path will prepended with the host.
Remarks
If the content is null or empty, the tag will be ignored or removed if it is already there
AddTag(string, string?)
Adds a custom meta data tag to the page view in the format <meta name="{Name}" content="{Content}" />.
public void AddTag(string name, string? content)
Parameters
Remarks
If the content is null or empty, the tag will be ignored or removed if it is already there