2

Salesforce communities provide native lightning components with the capability of allowing a user to drag and drop components into them. Not all components are allowed (i.e. A tab component cannot contain another tab component, but can contain a list view component). I have this very simple component:

<aura:component implements="forceCommunity:availableForAllPageTypes,forceCommunity:layout" access="global" >
 <aura:attribute name="detail" type="Aura.Component[]">

<p>default paragraph1</p>

</aura:attribute>
<aura:set attribute="detail"></aura:set>
Default value is: 
    {!v.detail}

</aura:component>

This component implements forceCommunity:layout, so I can create a page using it as a layout. When I do, components can be dragged in to where the '{!v.detail}' is. When I drag the component into an already-existing layout, I lose that functionality. Is there any way to do this?

1 Answers1

0

You need to edit template settings rather than drag it into the community builder.

If you want to add them programmatically, you'll need to do that inside a lightning component.

dzh
  • 286
  • 1
  • 19