Class WebPageUrlPathData
Represents URL path data.
public sealed class WebPageUrlPathData
- Inheritance
-
objectWebPageUrlPathData
- Extension Methods
Remarks
Use IWebPageUrlPathDataRetriever to get the url path data of web pages.
Properties
CanonicalUrlPath
Canonical URL path.
public string CanonicalUrlPath { get; }
Property Value
- string
Remarks
The canonical URL path must be either the system URL path or a vanity URL path.
SystemUrlFullPath
System URL full path.
public string SystemUrlFullPath { get; }
Property Value
- string
SystemUrlSlug
System URL slug.
public string SystemUrlSlug { get; }
Property Value
- string
VanityUrlPaths
Vanity URL paths.
public IEnumerable<string> VanityUrlPaths { get; }
Property Value
- IEnumerable<string>
Methods
AddVanityUrlPath(string)
Adds the vanity URL path to the collection of vanity URL paths.
public void AddVanityUrlPath(string vanityUrlPath)
Parameters
vanityUrlPath
stringVanity URL path to add.
Remarks
The new vanity URL path is normalized and forbidden characters are replaced before adding the path.
EditSystemUrlSlug(string)
Edits the system URL slug.
public void EditSystemUrlSlug(string newSystemUrlSlug)
Parameters
newSystemUrlSlug
stringNew system URL slug.
Remarks
The new URL slug is normalized and forbidden characters are replaced before the slug is edited.
EditVanityUrlPath(string, string)
Edits an existing vanity URL path in the collection of vanity URL paths.
public void EditVanityUrlPath(string oldVanityUrlPath, string newVanityUrlPath)
Parameters
oldVanityUrlPath
stringOld vanity URL path value.
newVanityUrlPath
stringNew vanity URL path value.
Remarks
The new vanity URL path is normalized and forbidden characters are replaced before the path is edited.
RemoveVanityUrlPath(string)
Removes the vanity URL path from the collection of vanity URL paths.
public void RemoveVanityUrlPath(string vanityUrlPath)
Parameters
vanityUrlPath
stringVanity URL path to remove.
SetCanonicalUrlPath(string)
Marks the passed URL path as canonical. The canonical URL path must be either the system URL path or a vanity URL path.
public void SetCanonicalUrlPath(string canonicalUrlPath)
Parameters
canonicalUrlPath
stringURL path to mark as canonical
Remarks
To set the system URL as canonical, use SystemUrlFullPath. To set a vanity URL as canonical, use the corresponding value from VanityUrlPaths.