Javascript :
import { LightningElement, api } from 'lwc'; export default class ApcApiArticle extends LightningElement { @api prevPart; connectedCallback() { this.sfdcBaseURL = window.location.origin; let org = this.sfdcBaseURL; this.prevPart = org; } HTML :
<template> <a href={prevPart}> Link to > </a> </template> .js-meta.XML :
<?xml version="1.0" encoding="UTF-8"?> <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> <apiVersion>57.0</apiVersion> <isExposed>true</isExposed> <targets> <target>lightningCommunity__Default</target> <target>lightningCommunity__Page</target> </targets> <targetConfigs> <targetConfig targets="lightningCommunity__Default"> <property name="prevPart" label="URL Article " type="String" **default="prevPart"** /> i expose this component in community site , i want the default link to take the url but it doesn't work - Any solution?