MakeRelativeLinkFromURL (open)
Convert an absolute URL to a relative one, if at all possible
Syntax
LOADLIB "wh::internet/urls.whlib";
STRING FUNCTION MakeRelativeLinkFromURL(STRING current_url, STRING convert_url, STRING scope)Parameters
STRING current_urlCurrent page URL
STRING convert_urlURL to try to convert to a relatve
STRING scopeOptional: scope within which to make the URL relative ("", "protocol" or "root")
Return value
STRINGRelative URL, if it was possible to make it. Otherwise, this function returns the original 'convert_url'