Using on the Lightning Home Page
In this section, we will learn about the different steps for adding the SharinPix Album Component onto the Home page, as shown in the screenshot below.
The SharinPix Album component was previously named SharinPix.
In the chapter Using SharinPix on Lightning From a Record Page, we've seen that it is possible to add the SharinPix Album component to a record page without specifying the album Id. This is because the component's default album id corresponds to the id of the current record.
However when adding the SharinPix Album component to the Home Page, it is mandatory to specify an album id , as the Home Page does not possess a default record Id.
Each album needs to be associated with a Record Page.
In order to determine which album Id to use, you need to choose which images you want to display on the Home Page. If these images are already present on a record page, you can use its corresponding record id as the album Id. (see the next section, Finding the Album Id, to learn how to retrieve a record page's record id).
However, if you don't have a ready-made record page that uses the SharinPix Album component in a ready-made object, you'll need to create a custom object to house the records and images for your home page.
Here's how this can be done:
- Create a new custom object, named for example, Photo Files.
- Create at least one record for your object. (Say, Home Page Photos.)
- Add a SharinPix Album component to the new record (Using SharinPix on Lightning From a Record Page for more info.)
- Upload your home page images into the SharinPix Album component.
Next, we'll get the Album Id to use on our Home Page's SharinPix Album.
Here's how to find the record Id (album Id) of a record of your choice:
- Navigate to the desired record containing the images you wish to display on the Home Page.
- Copy the highlighted value as shown below from the address bar of the browser. ( 18 numbers after the "object name/")
- Paste the copied value inside the album id field (see Configure SharinPix Parameters).
To add SharinPix Album component on the Home Page:
- Click on the Setup Icon.
- Select Edit Page.
- From the Lightning Components list under the Custom - Managed section, select the SharinPix Album component.
- Drag and drop the component into the page.
After dropping the SharinPix Album component on the desired region, you will be able to configure its parameters from the right side panel.
The parameters are:
Album Id - specify an album id from which to display the images. IMPORTANT: The value for the album is required in the Home Page layout context. (see Extracting the album Id)
Height - Specify the height of the SharinPix component. The Minimum size allowed is 300.
Use Fullscreen Image Viewer - Enable/disable option to view image in full screen.
Fullscren Viewer Padding - To add padding.
Enable Action - Enable/disable Tag Action.
Enable Image Sync - Enable/disable Image Sync.
Enable Toast - Enable/disable toast on successful image upload.
Auto Refresh View - Enable/disable option to reload view.
Custom Permission Id or Name - Specify the id for a custom permission.
Component ID: Used to specify the component Id's to be matched by add-on components on a page.
5. Click on Save when done.