Class Link
- Namespace
- Dynamicweb.Mailing.Links
- Assembly
- Dynamicweb.Core.dll
Represents link
- Inheritance
-
Link
- Inherited Members
Constructors
Link()
Initializes a new instance of the Link class.
Fields
LinkAdditionalParametersRequestNamePrefix
Field Value
LinkClickerRequestName
Field Value
LinkHandlerBaseUrl
Field Value
LinkIdRequestName
Field Value
LinkParseRegex
public const string LinkParseRegex = "(https?:\\/\\/|www)[-A-Za-z0-9+&@#/%?=~_()|!:,.;]*[-A-Za-z0-9+&@#/%=~_()|]"
Field Value
LinkTagRequestNamePrefix
Field Value
Properties
Clicks
Gets the link clicks.
Property Value
Id
Gets the id.
Property Value
IsNew
Gets a value indicating whether this instance is new.
Property Value
- bool
true
if this instance is new; otherwise,false
.
LinkReferenceKey
Gets or sets the link reference key. This value is a unique identifier to determine to where the Link belongs.
Property Value
- string
The link reference key.
LinkReferenceType
Gets or sets the type of the link reference. This value is a unique identifier to determine to where the Link belongs.
Property Value
- string
The type of the link reference.
OriginalUrl
Gets or sets the original URL of the Link.
Property Value
- string
The original URL.
Methods
Delete()
Deletes this instance.
Returns
- bool
True if delete operation succeeded
FindTags(string)
Parameters
url
string
Returns
GetLinkById(int)
Gets the link by id.
Parameters
id
intThe id.
Returns
GetLinkHandlerUrl()
Gets the LinkHandler url for this Link. This url is a relative path, eg. "/Link.ashx?id=xxx".
Returns
GetLinkHandlerUrl(bool)
Gets link handler url
Parameters
isParseLink
boolIf True then uses link handler base url value
Returns
- string
Parsed link url
GetLinkOriginalUrl(int)
Gets the link url by id.
Parameters
id
intThe link id.
Returns
GetLinksByTypeAndKey(string, string)
Gets the links by type and key.
Parameters
Returns
ParseAndReplaceAndSaveLinks(bool, string, string, string, string, bool)
Parses all link elements in a given text that match the Link
public static Tuple<string, LinkCollection> ParseAndReplaceAndSaveLinks(bool saveLinks, string text, string referenceKey, string referenceType, string linkDomain, bool isParseLink = false)
Parameters
saveLinks
boolIndicates, need to save the links or not
text
stringThe text to find and replace links in.
referenceKey
stringThe reference key to add to the links.
referenceType
stringThe reference type to add to the links.
linkDomain
stringThe link domain
isParseLink
boolIndicates, need to parse link or not
Returns
- Tuple<string, Link
Collection > A combination of the replaced string and all links found.
Save()
Saves this instance.
Returns
- bool
True is save operation succeeded