Class SearchEngineFriendlyURLs
- Namespace
- Dynamicweb.Frontend
- Assembly
- Dynamicweb.dll
Helper methods for handling search friendly urls.
- Inheritance
-
Search
Engine Friendly URLs
- Inherited Members
Properties
RedirectType
Gets the type of the search engine friendly url.
Property Value
- Search
Engine .TypeFriendly URLs The type of the redirect.
UseExtensionLessUrls
Gets a value indicating whether the solution uses extension less urls.
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
Parameters
pageID
intID 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
Parameters
pageID
intID of page
alternatekey
stringThe 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
Parameters
internalLink
stringThe 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
Parameters
internalLink
stringThe internal link, i.e. Default.aspx?ID=123&NewsID=456&action=1.
alternatekey
stringThe 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