An Experience Cloud component that allows for more customization than the OOTB Record Banner component.
The OOTB Record Banner is set using the Compact Layout of the object; the compact layout assignment is done by record type - we cannot change the compact layout in experience cloud without also changing the internal view for that record type. This LWC lets us specify which fields to display instead of having to modify the compact layout of the record type for all users.
via sfdx-cli
sfdx force:package:install --package 04t5e000000e1gWAAQ -u [email protected]
via url
login and navigate to /packaging/installPackage.apexp?p0=04t5e000000e1gWAAQ
. Choose Install for: Admin Only
.
- Go to your community in Experience cloud
- Go to a record detail page
- Drag the component
Record Home
onto the page - Fill in the component parameters as needed
- This page can live on the record detail pages within Experience Cloud
- Just specify the
Record Id
attribute as{!recordId}
- Just specify the
- If you wanted to display a known record across multiple pages, you could hardcode the Id and fields
- You have the ability to display specific fields from the record instead of being tied to a compact layout.
- You have the ability to toggle the display of an icon (leave it blank to not display one).
- Reference the list of supported SLDS icons at https://www.lightningdesignsystem.com/icons/
- There are some quirks with lookup fields on Standard Objects