Table of Contents

Class SearchEngineFriendlyURLs

Namespace
Dynamicweb.Frontend
Assembly
Dynamicweb.dll

Helper methods for handling search friendly urls.

public static class SearchEngineFriendlyURLs
Inheritance
SearchEngineFriendlyURLs
Inherited Members

Properties

RedirectType

Gets the type of the search engine friendly url.

public static SearchEngineFriendlyURLs.Type RedirectType { get; }

Property Value

SearchEngineFriendlyURLs.Type

The type of the redirect.

UseExtensionLessUrls

Gets a value indicating whether the solution uses extension less urls.

public static bool UseExtensionLessUrls { get; }

Property Value

bool

true if extension less urls should be used; otherwise, false.

Remarks

Does not return the value of the setting in GlobalSettings. Only returns true if the option is set, the application pool is integrated and the the URL schema is Path

Methods

GetFriendlyUrl(int)

Used for getting a searchfriendly version of a Dynamicweb url with just the PageID

public static string GetFriendlyUrl(int pageID)

Parameters

pageID int

ID of page

Returns

string

The searchfriendly url to the specified PageID, i.e: /Products/Product1.aspx

GetFriendlyUrl(int, string)

Used for getting a searchfriendly version of a Dynamicweb url with just the PageID

public static string GetFriendlyUrl(int pageID, string alternatekey)

Parameters

pageID int

ID of page

alternatekey string

The alternate key to use for module url lookups if the context will not be used. Usually an Ecommerce languageId (LANG1). The alternate key will be taken from context if it is not specified.

Returns

string

The searchfriendly url to the specified PageID, i.e: /Products/Product1.aspx

Remarks

Use this overload if you want to resolve a URL from i.e. an English language context to the same products German context. Pass in the language id of the German context

GetFriendlyUrl(string)

Used for getting a searchfriendly version of a Dynamicweb url with all parameters

public static string GetFriendlyUrl(string internalLink)

Parameters

internalLink string

The internal link, i.e. Default.aspx?ID=123&NewsID=456&action=1.

Returns

string

/module/news/NameOfNews.aspx?action=1

GetFriendlyUrl(string, string)

Used for getting a searchfriendly version of a Dynamicweb url with all parameters

public static string GetFriendlyUrl(string internalLink, string alternatekey)

Parameters

internalLink string

The internal link, i.e. Default.aspx?ID=123&NewsID=456&action=1.

alternatekey string

The alternate key to use for module url lookups if the context will not be used. Usually an Ecommerce languageId (LANG1). The alternate key will be taken from context if it is not specified.

Returns

string

/module/news/NameOfNews.aspx?action=1

Remarks

Use this overload if you want to resolve a URL from i.e. an English language context to the same products German context. Pass in the language id of the German context

To top