Salla Docs
Merchant API
  • Merchant API
  • Salla OAuth 2.0
Partner APIs
  • App API
  • Shipment API
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Change Log
Salla CLI
Merchant API
  • Merchant API
  • Salla OAuth 2.0
Partner APIs
  • App API
  • Shipment API
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Change Log
Salla CLI
Salla - Opensource
Salla - Developers Community
  1. Home Components
  • Getting Started
    • Create a theme
    • Develop a theme
    • Setup a theme
    • Publish a theme
  • Requirements & Review
    • Overview
    • Main Requirements
    • Review Process
      • UI / UX Review
      • Technical Review
      • Metadata Review
      • Pre-Launch Review
  • Files and Folders Structure
    • Directory structure
    • Twilight.json
  • Twig Template Engine
    • Basic syntax
    • Twilight flavoured twig
  • Theme Architecture
    • Layouts
      • Overview
      • Master Layout
      • Global Variables
      • CSS Variables
      • Salla Icons
      • Custom Fonts
      • Hooks
      • Localizations
    • Pages
      • Overview
      • Home Page
      • Product Pages
        • Products listing
        • Single product
      • Customer Pages
        • Profile
        • Orders list
        • Order details
        • Wishlist
        • Notifications
      • Blog Pages
        • Blog listing
        • Single blog
      • Brand Pages
        • Brands listing
        • Single brand
      • Common Pages
        • Cart
        • Loyalty
        • Thank you
        • Single page
        • Landing Page
    • Componenets
      • Overview
      • Home Components
        • Youtube
        • Fixed banner
        • Testimonials
        • Parallax background
        • Photos slider
        • Store features
        • Square photos
        • Fixed products
        • Products slider
        • Featured products - Style 1
        • Featured Products - Style 2
        • Featured Products - Style 3
        • Brands
        • Enhanced Square Banners
        • Main Links
        • Enhanced Slider
        • Slider Products with Headers
        • Latest Products
        • Vertical Menu with Slider
      • Product Components
        • Essentials
        • Options
      • Common Components
        • Header Components
        • Footer Components
        • Comments component
  • Change Log
  1. Home Components

Testimonials

This pre-defined component displays testimonials, which are feedback given by customers. The display order is set as per newest.
Following is the location of this component.

Example#

Testimonials Components

Variables#

HomeTestimonials
limit
string 
optional
Maximum number of the testimonials
items
object 
optional
This object is a Paginator as well, so it performs the pagination function to specify which view should be used to create pagination links. Example: items.next_page
object (Feedback) 
optional
id
integer 
optional
Id of the item.
avatar
string 
optional
avatar image of the user created the testiminial.
has_order
boolean 
optional
Check if the comment has an order.
created_at
string <date>
optional
The date of creating the testimonial.
stars
integer 
required
Stars rating system.
content
string 
required
Conent of the testimonial.
type
enum<string> 
optional
The type of the item which the user is giving the testimonial of.
Allowed values:
allproductstore`default:store` all
Default:
store
position
string 
optional
Sorting number start from zero

Usage#

The file src\views\components\home\testimonials.twig receives a list of testimonials, which are the customers' feedbacks, in the form of a collection of items[],and then displays them inside a slider. The sorting of this collection is as per the newest.
In the following code we see how we can easily display the values of item.avatar, item.name, item.text inside the slider uing for-loop. Also salla-button is used here to navigate between previous slide and next slide.
Previous
Fixed banner
Next
Parallax background