- Print
Shortform Collection Integration
- Print
This guide introduces how to integrate Shortform Collection
![image(276).png](http://cdn.document360.io/8bb2db22-cdde-4eb3-88b1-eb7b8a285489/Images/Documentation/image(276).png)
[Step 1] Initialization
Here are examples of how you can initialize the Shoplive Shortform without user authentication, simple authentication, and JWT token authentication
Install with desired auth type of initialization code in common layout (head area, etc.)
Detail information can be found in User Authentication.
Access Key
Access key and secret key can be obtained from Shoplive representative.
[Step 2] Rendering Shortform Collection with the desired template
Enter the code below where you want to display the Shortform list. The template field indicates which layout you want to use for Shortform list.
▶︎ Introduction to Shortform Collection
Shortform lists can be displayed in the 3 formats below. You can also specify whether to use the "VIEW MORE" button and the maximum number of rows.
Grid1 - Vertical Scroll Layout (Large content)
Grid2 - Vertical Scroll Layout (Small content)
Horizontal - Horizontal Scroll Layout
Grid1 - Vertical Scroll Layout (Large content)
Insert below code.
![image(95).png](http://cdn.document360.io/8bb2db22-cdde-4eb3-88b1-eb7b8a285489/Images/Documentation/image(95).png)
Grid2 - Vertical Scroll Layout (Small content)
Insert below code
![image(96).png](http://cdn.document360.io/8bb2db22-cdde-4eb3-88b1-eb7b8a285489/Images/Documentation/image(96).png)
Horizontal - Horizontal Scroll Layout
Insert below code
![image(97).png](http://cdn.document360.io/8bb2db22-cdde-4eb3-88b1-eb7b8a285489/Images/Documentation/image(97).png)
UI Configuration
rows and hasMoreButton options are available only for Grid1 and Grid2
Parameter | Function | Description | default |
---|---|---|---|
rows | Max rows | Sets the default number of rows that apply to the vertical scroll layout. | 2 (max:4) |
hasMoreButton | Whether showing the ‘View More’ button | Indicates whether to display the "View more" button. If not displayed, additional rows are automatically loaded when the bottom of the list is reached. | true |
<div id="shoplive-shortform-2"></div>
<script defer >
cloud.shoplive.setShortformCollection("shoplive-shortform-2", {template: "GRID2" ,hasMoreButton:true, rows:4} );
</script>