Integrating with Lightning Communities

Lightning Community is another container for your Lightning components that allows you or your customers to use components to build consumer-facing websites; as such, the components featured in this chapter are already close to being able to exist within it and the Lightning Community Builder tool. The same considerations for specifying a component metadata file as described in the previous section also apply so that the components appear correctly in the Lightning Community Builder tool, notably making sure that the component's targets include lightningCommunity__Page, as shown here:

<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="raceCalendar">
<apiVersion>45.0</apiVersion>
<isExposed>true</isExposed>
<masterLabel>Race Calendar</masterLabel>
<targets>
<target>lightning__RecordPage</target>
<target>lightning__AppPage</target>
<target>lightning__HomePage</target>
<target>lightningCommunity__Page</target>
</targets>
</LightningComponentBundle>

The following screenshot shows Lightning Community Builder containing the Race Calendar and Race Results components to build a basic fan site:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.171.253