Summary
Converts the path into a string appropriate for use as a link, overriding one or more
settings from the Wyam.Common.Configuration.IReadOnlySettings
.
Syntax
public static string GetLink(this IExecutionContext context, NormalizedPath path, string host, DirectoryPath root, bool useHttps, bool hideIndexPages, bool hideExtensions)
Parameters
Name |
Type |
Description |
context |
IExecutionContext |
The execution context. |
path |
NormalizedPath |
The path to generate a link for. |
host |
string |
The host to use for the link. |
root |
DirectoryPath |
The root of the link. The value of this parameter is prepended to the path. |
useHttps |
bool |
If set to true , HTTPS will be used as the scheme for the link. |
hideIndexPages |
bool |
If set to true , "index.htm" and "index.html" file
names will be hidden. |
hideExtensions |
bool |
If set to true , extensions will be hidden. |
Return Value
Type |
Description |
string |
A string representation of the path suitable for a web link with the specified
root and hidden file name or extension.
|