How to do it...

Carry out the following steps to develop a custom Lightning component and add it to an existing Home page within Lightning App Builder:

  1. Click on the Setup gear icon, as shown in the following screenshot:
The Setup gear icon is located in the top right-hand corner of the main Home page.
  1. Click the Developer Console option, as shown in the following screenshot:
  1. In the resulting Developer Console window, click on File.
  2. Click on New.
  3. Click on Lightning Component, as shown in the following screenshot:
  1. In the resulting New Lightning Bundle dialog, enter CompanyLogo for the Name.
  2. Enter This is a Company Logo Component for the Description.

 

  1. Click on Submit, as shown in the following screenshot:
  1. In the resulting Component page, paste the following code:
<aura:component implements="flexipage:availableForAllPageTypes" access="global"> 
   <img src="{!$Resource.WidgetsXYZlogo}"/> 
</aura:component> 
  1. Click on File.
  2. Click on Save, as shown in the following screenshot:
  1. Now, to add the component to an existing Home page using Lightning App Builder, click on the Setup gear icon, as shown in the following screenshot:
The Setup gear icon is located in the top right-hand corner of the main Home page.
  1. Click the Setup option, as shown in the following screenshot:
  1. Type app builder in the Quick Find search box, as shown in the following screenshot:
  1. Select the Lightning App Builder option.
  2. Click the Edit link for the Home_Page_Default customized Home page, as shown in the following screenshot:
  1. In the resulting Lightning App Builder page, drag and drop the CompanyLogo component from the custom Lightning Components pane to the top of the Home page canvas, as shown in the following screenshot:
At the time of writing, custom Lightning Components only appear in the list of Lightning Components if you have set a custom Salesforce domain name for your organization. This is required for security reasons and is done by creating a My Domain subdomain, as detailed in the There's more... section of this recipe.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset