lightningCommunity__Page_Layout Target

Enables a component to be used in Experience Builder as a page layout for an LWR site. Components appear in the Content Layout window.

Syntax 

1<?xml version="1.0" encoding="UTF-8"?>
2<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
3    <apiVersion>58.0</apiVersion>
4    <isExposed>true</isExposed>
5    <targets>
6        <target>lightningCommunity__Page_Layout</target>
7    </targets>
8</LightningComponentBundle>

Usage 

lightningCommunity__Page_Layout doesn’t support component properties. To create a region on the page, use a named slot. You can also use the Lightning Design System utility classes for padding or alignment.

1<template>
2  <header class="slds-col_padded slds-p-vertical_small">
3    <slot name="header"></slot>
4  </header>
5  <section class="slds-col_padded slds-p-vertical_small">
6    <slot name="sidebar"></slot>
7  </section>
8</template>

In your component’s JavaScript, include the @slot annotation in a JSDoc comment.

1import { LightningElement } from "lwc";
2/**
3 * @slot header
4 * @slot sidebar
5 */
6export default class CustomThemeLayout extends LightningElement {}

The JSDoc annotation containing @slot followed by the name of the region is required for the platform to know which slots (or regions in Experience Builder) are exposed for your page layout component.

See Also