You need to sign in to do that
Don't have an account?
kumquatlily
Custom Lightning Web Components Enable in Community Builder
Hi,
My problem - a few of the custom lightning web components in my sandbox org, I can enable them to my sandbox org community builder. However, the rest of custom lighning web components that I need in community builder, I cannot enable to community builder.
Question - A) is it required to add isExposed = true and lightningCommunity__Page in Target to custom lightning web component for enabling to Community Builder?
Or
B) just add forceCommunity:availableForAllPageTypes and access="global" to the custom web component?
Much appreciate your advise which of these two methods should I be using A or B?
If A - where should I add isExposed = true and lightningCommunity__Page in Target? in Component or in SVG within Developer Console? and do I need to addother Target besides lightningCommunity_Page?
If B - do I need to add access="global" to all aura:attribute name as well as all aura:attribute handler too?
What I did - to a custom web component from an app that downloaded from appExchange, I added forceCommunity:availableForAllPageTypes and access="global" to 'implements' and all the attribute name, it works, I see in my Sandbox Community Builder, see below:
Other custom web components from the same app, is not coming up in Sandbox Community Builder components...
<aura:component controller="PropertyController"
implements="flexipage:availableForAllPageTypes,forceCommunity:availableForAllPageTypes" access="global">
<aura:attribute name="properties" type="Property__c[]" access="global"/>
<aura:attribute name="pageSize" type="integer" default="8" access="global"/>
<aura:attribute name="page" type="integer" access="global"/>
<aura:attribute name="pages" type="integer" access="global"/>
<aura:attribute name="total" type="integer" access="global"/>
<aura:attribute name="searchKey" type="String" default="" access="global"/>
<aura:attribute name="minPrice" type="integer" default="0" access="global"/>
<aura:attribute name="maxPrice" type="integer" default="10000000" access="global"/>
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
<aura:handler event="c:RangeChange" action="{!c.onRangeChange}"/>
<aura:handler event="c:EinsteinVisionEvent" action="{!c.onEinsteinVisionEvent}"/>
<lightning:layout horizontalAlign="center" multipleRows="true">
<aura:iteration items="{!v.properties}" var="property">
<lightning:layoutItem padding="around-small" size="12" smallDeviceSize="6" mediumDeviceSize="4" largeDeviceSize="3">
<c:PropertyTile property="{#property}"/>
</lightning:layoutItem>
</aura:iteration>
</lightning:layout>
<c:PropertyPaginator page="{!v.page}" pages="{!v.pages}" total="{!v.total}"
pagePrevious="{!c.onPagePrevious}" pageNext="{!c.onPageNext}"/>
</aura:component>
My problem - a few of the custom lightning web components in my sandbox org, I can enable them to my sandbox org community builder. However, the rest of custom lighning web components that I need in community builder, I cannot enable to community builder.
Question - A) is it required to add isExposed = true and lightningCommunity__Page in Target to custom lightning web component for enabling to Community Builder?
Or
B) just add forceCommunity:availableForAllPageTypes and access="global" to the custom web component?
Much appreciate your advise which of these two methods should I be using A or B?
If A - where should I add isExposed = true and lightningCommunity__Page in Target? in Component or in SVG within Developer Console? and do I need to addother Target besides lightningCommunity_Page?
If B - do I need to add access="global" to all aura:attribute name as well as all aura:attribute handler too?
What I did - to a custom web component from an app that downloaded from appExchange, I added forceCommunity:availableForAllPageTypes and access="global" to 'implements' and all the attribute name, it works, I see in my Sandbox Community Builder, see below:
Other custom web components from the same app, is not coming up in Sandbox Community Builder components...
<aura:component controller="PropertyController"
implements="flexipage:availableForAllPageTypes,forceCommunity:availableForAllPageTypes" access="global">
<aura:attribute name="properties" type="Property__c[]" access="global"/>
<aura:attribute name="pageSize" type="integer" default="8" access="global"/>
<aura:attribute name="page" type="integer" access="global"/>
<aura:attribute name="pages" type="integer" access="global"/>
<aura:attribute name="total" type="integer" access="global"/>
<aura:attribute name="searchKey" type="String" default="" access="global"/>
<aura:attribute name="minPrice" type="integer" default="0" access="global"/>
<aura:attribute name="maxPrice" type="integer" default="10000000" access="global"/>
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
<aura:handler event="c:RangeChange" action="{!c.onRangeChange}"/>
<aura:handler event="c:EinsteinVisionEvent" action="{!c.onEinsteinVisionEvent}"/>
<lightning:layout horizontalAlign="center" multipleRows="true">
<aura:iteration items="{!v.properties}" var="property">
<lightning:layoutItem padding="around-small" size="12" smallDeviceSize="6" mediumDeviceSize="4" largeDeviceSize="3">
<c:PropertyTile property="{#property}"/>
</lightning:layoutItem>
</aura:iteration>
</lightning:layout>
<c:PropertyPaginator page="{!v.page}" pages="{!v.pages}" total="{!v.total}"
pagePrevious="{!c.onPagePrevious}" pageNext="{!c.onPageNext}"/>
</aura:component>