Table of Contents

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

Uri

Canonical

Gets or sets the canonical URL of the page.

public Uri? Canonical { get; set; }

Property Value

Uri

Description

Gets or sets the meta description of the page.

public string? Description { get; set; }

Property Value

string

Keywords

Gets or sets the meta keywords of the page.

public string? Keywords { get; set; }

Property Value

string

Robots

Gets or sets the robots meta tag of the page.

public string? Robots { get; set; }

Property Value

string

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 string

The 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 string

The Open Graph property name (without "og:").

content string

The 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

name string

The name of the meta tag.

content string

The content of the meta tag.

Remarks

If the content is null or empty, the tag will be ignored or removed if it is already there

To top