commit
1b6d791db8
2 changed files with 13 additions and 1 deletions
|
|
@ -14,7 +14,7 @@
|
|||
<textLink
|
||||
linkType="text"
|
||||
:text="getRouterLinkDisplayTextFromCopy(copy)"
|
||||
href="#!"
|
||||
:href="getExternalLink(copy)"
|
||||
@click-event="$emit('textLinkClicked', getRouterLinkRouteFromCopy(copy))"
|
||||
:data-bs-target="'#' + getRouterLinkRouteFromCopy(copy)" />
|
||||
</span>
|
||||
|
|
@ -34,6 +34,7 @@ import {
|
|||
splitCopyOnCMSPlaceHolder,
|
||||
getRouterLinkRouteFromCopy,
|
||||
getRouterLinkDisplayTextFromCopy,
|
||||
getExternalLink,
|
||||
} from "@/helpers/cms-content-helper";
|
||||
import { applicationConfig } from "@/constants/application-config";
|
||||
|
||||
|
|
@ -53,6 +54,7 @@ export default {
|
|||
splitCopyOnCMSPlaceHolder,
|
||||
getRouterLinkRouteFromCopy,
|
||||
getRouterLinkDisplayTextFromCopy,
|
||||
getExternalLink,
|
||||
},
|
||||
computed: {
|
||||
pageQueryString() {
|
||||
|
|
|
|||
|
|
@ -310,6 +310,16 @@ export function getRouterLinkRouteFromCopy(copy) {
|
|||
return copy.split(":")[1].split(",")[0];
|
||||
}
|
||||
|
||||
export function getExternalLink(copy) {
|
||||
let url = copy.split(":")[1].split(",")[0];
|
||||
if (url.includes("https-")) {
|
||||
const prefixAdded = url.replace("https-", "https://");
|
||||
return prefixAdded;
|
||||
}
|
||||
|
||||
return "#!";
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns string3 of input following this pattern: {string1:string2,string3}
|
||||
* @returns string
|
||||
|
|
|
|||
Loading…
Reference in a new issue