Tuesday, February 8, 2022

How to Retrieve the info about Lightning Community in LWC

 Hello Friends today we are going to discus how to get Lighting community details in to LWC.

we can use the @salesforce/community module  in to Lightning web components for Lightning communities.

it help to provide information about the current community context with in LWC, let see by some of the Example.

Example 1:-

Use @salesforce/community/Id to import the ID of the current community

use case, when your component must pass the community ID as a parameter to an API.

syntax :-

import communityId from ‘@salesforce/community/Id’;

Example 2:-

Use @salesforce/community/basePath to import the base URL of your community

Use case, when building a link component that works across several communities.
syntax :-
import communityBasePath from ‘@salesforce/community/basePath’;

1 comment:

abbyquenneville said...

SlotyCasino - Mapyro
SlotyCasino. 통영 출장마사지 Las Vegas. 의왕 출장안마 A lively casino, where 대구광역 출장안마 you can enjoy slots games and live dealer games. Welcome Bonus 100%. 삼척 출장마사지 Rating: 3.5 · ‎7 votes 경상남도 출장마사지