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. Layouts
  • 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. Layouts

Global Variables

In ths article we will list all of the global variables provided with the Twilight theme engine.
Tip
These varibles can be used within any of the Theme's pages.

Global variables
store
object (Store) 
optional
id
integer 
required
Id number of the store.
name
string 
required
Name of the store that will be displayed in the store website.
Example:
Coach .co
username
string 
required
Username of the store. This can be used by the merchant to manage the store.
Example:
coachestore
description
string 
required
Description of the store.
Example:
Store for hand bags
slogan
string 
optional
Slogan of the store is used for marketing and it helps to identify the store. Slogan is used if feature is in twilight.json.
logo
string 
required
Logo of the store.
url
string 
required
Url link of the store.
api
string 
required
The api url for current store.
icon
string 
required
The fav icon url, which is shown on the page browser tab.
contacts
object 
required
Store contact details.
social
object 
required
Store social accounts details [instagram, snapchat, twitter, youtube, facebook, pinterest, maroof, whatsapp], ex. store.social.twitter.
settings
object 
required
Settings of the store.
theme
object (Theme) 
optional
id
integer 
required
Id of the theme.
name
string 
required
Name of the theme.
mode
enum<string> 
required
Mode of the theme.
Allowed values:
livepreview
is_rtl
boolean 
required
Theme writings are left to right.
translations_hash
integer 
required
To be used in case merchant updated frontend store translations.
color 
object 
required
Color of theme.
font
object 
optional
Salla predefined font, null when the theme doesn't have fonts feature.
settings
object 
required
Dynamic object with values of the settings in twilight.json ex. theme.topnav_is_dark.
components
array[string]
optional
Array of strings that consists of the home page components. Only valid for the Home Page index.
Allowed values:
home.slider-products-with-headerfeatured_productshome.main-linkstestimonialhome.brandshome.enhanced-square-bannershome.brandssquare_photosproducts_sliderproducts_sliderparallax_backgroundphotos_sliderfixed_bannerstore_featuresfeatured_productsphotos_sliderhome.enhanced-products-slider
Educational Clip
Previous
Master Layout
Next
CSS Variables