setLinkRel(string rel,string url,array additionalAttributes = [])¶
The setLinkRel method is used to set links in MetaProperties object.
This method only works in integration modules.
Input parameters¶
rel¶
string, allowed values:
canonicaldns-prefetchpreconnectpreloadalternateprevnextauthorpublisher
For the following rel values:
canonicalprevnextpublisher
only one <link> tag with a given rel value will be displayed.
This means that if the setLinkRel method is called multiple times with the same rel value,
only the last set link will be displayed. Previous ones will be overwritten.
url¶
string The URL address for the link. You can use absolute or relative URLs.
additionalAttributes¶
array Additional list of attributes to be added to the <link> tag.
Returned value¶
A returned value has a type of bool. true is returned if the link was set successfully, otherwise false.