I want to add a lightning component in the layout of a record page of a community. Inside salesforce i have clicked edit page, and added the component. But i also want to expose it somehow in my community but it does not appear. Any ideas ?

  • 1
    add forceCommunity:availableForAllPageTypes interface – Sarvesh Apr 1 at 11:01

You should add interface or target symbol before you add any lightning component to Community page via Community Builder.

If you use Lightning Aura Component i.e. aura, addforceCommunity:availableForAllPageTypes:

<aura:component implements="forceCommunity:availableForAllPageTypes">
<!-- code -->

If you use Lightning Web Component i.e. lwc, add<target>lightningCommunity__Page</target> to Component Configuration File:

<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">

Friendly you can find more related information from Salesforce reference from aura or lwc

| improve this answer | |
  • Thanks for the solution!! – Giorgos Galaios Apr 1 at 14:34
  • Lol, he copied and improve it, booooh! – Pirata21 Apr 1 at 14:42
  • @Pirata21 I've worked on this part recently and also developed related code in a Salesforce IDE. Your answer includes the core of the solution but not is not friendly to anyone not familiar with Lightning. I cannot comment on your answer so I decide to write a more friendly version. Thanks for your support to the community. – Lushang Apr 15 at 12:43

You must have to specify it, on the metadata:

LWC: `

    <target> lightning__RecordPage </target>


<aura:component implements="flexipage:availableForRecordHome" access="global">
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.