Skip to main content
Join the Agentforce Hackathon on Nov. 18-19 to compete for a $20,000 Grand Prize. Sign up now. Terms apply.

Use Lightning Web Runtime Templates

Learning Objectives

After completing this unit, you’ll be able to:

  • Describe the Build Your Own (LWR) and Microsite templates.
  • Use the current out-of-the-box LWR components.

The Build Your Own (LWR) Template

The Build Your Own (LWR) template provides a blank canvas for all the sites you can dream up. Using the Lightning Web Component (LWC) programming model, the template is built on code that runs natively in web browsers. Pair that with the speedy LWR framework and you’re really in business. 

Performance and Flexibility

The Build Your Own (LWR) template is the do-it-all template that showcases LWR and its capabilities. It’s designed to be absolutely streamlined, providing room for savvy developers and site builders to come in and work their magic. To make this template more accessible, we created a zip file that contains many code samples for sample components and extensions. The template also includes many of the building block Lightning web components that are built into LWR.

The Microsite Template (LWR)

The Microsite template is the perfect canvas for your small, special-use websites. Built to let you spin up a site that you can just as easily take down, microsites are ideal for event pages, landing pages, or any other collection of pages you can dream up. Once its time has run its course, you can then archive the site. The template includes flexible styling options, a built-in theme header, and components designed to capture lead information and send it where it needs to go. 

Configurable Theme Header

The Microsite template comes with built-in theme options that make configuring your headers and footers simple. With the new Theme Header, you can choose to fix the header and footer when your users scroll or let the sections move with the content. Use a second configurable header to add your navigation. We provide all the point-and-click tools you need to build a complex navigation header, including automatic linking to Salesforce objects, external URLs, site pages, events, global actions, and more. 

Lead Form and Marketing Cloud Engagement Form Components

Microsites are designed to be unauthenticated experiences that are related to, but not necessarily linked from, your primary website. Websites like this often capture visitor information and store it for later use. The Lead Form and Marketing Cloud Engagement Form components give you the tools to do just that. Both components are available in the Build Your Own (LWR) and Microsite templates, but the Microsite template is specifically designed to cater to this use case.

The Lead Form component provides a form that’s mapped to the Lead object in Salesforce. The form contains a collection of fields that are automatically mapped to standard fields on the Lead object and custom fields where you can add your own mapping. When a visitor comes to your site and enters their information, the Lead Form component captures it and sends it to the Lead object, where it awaits further use. 

In a similar vein, the Marketing Cloud Engagement Form component captures visitor information and sends it directly to Marketing Cloud Engagement data extensions. After adding the component to your site and connecting Marketing Cloud Engagement in the background, you can create a new data extension with one click. Contact information is captured from your site and sent directly to Marketing Cloud Engagement. 

You can find code samples for the Lead Form and Marketing Cloud Engagement Form components in the Experience Cloud Microsite Samples GitHub repository.

Build Faster with Lightning Web Components

The LWR framework uses the LWC programming model, which allows developers to quickly and efficiently build their own components and sync them to LWR sites. Lightning web components are built with standard technologies such as HTML, JavaScript, and CSS. Because they’re built with code that runs natively in modern browsers, they are lightweight, don’t require specialized knowledge, and load quickly.

You learn more about Lightning web components and their capabilities within the LWR framework in the next unit. 

Resources

Share your Trailhead feedback over on Salesforce Help.

We'd love to hear about your experience with Trailhead - you can now access the new feedback form anytime from the Salesforce Help site.

Learn More Continue to Share Feedback