Global Variables Documentation
Global Variable Syntax Global variables are accessed using the special Handlebars helper syntax throughout the application:
{{global 'domain'}}- Site domain{{global 'site_name'}}- Site name{{global 'currency'}}- Site default currency This templating syntax allows for dynamic access to system-wide properties in various parts of the application.
π QuickPanel-v5 Documentation
Global Variables Reference
Access system-wide properties dynamically throughout your templates with these powerful global variables.
π 25+ Variables
π§ Easy Integration
π Real-time Updates
How to Access Global Variables
Use the Handlebars helper syntax to access any global variable in your templates:
π Example: Displaying the site name
<h1>Welcome to
{{global'site_name'}}</h1>Basic Site Information
Site domain name
Site name/title
Default currency code
Currency symbol
Site Statistics
Total number of orders
Total registered users
Display Settings
Decimal precision for prices
Feature Settings
Access via details objectπ€ User Account Features
π Security Features
π¦ Order & API Settings
π³ Payment & Support
Implementation Examples
Here are some practical examples of how to use global variables in your templates:
Site Header Example
<header class="site-header">
<h1>{{global 'site_name'}}</h1>
<nav>
<a href="https://{{global 'domain'}}">Home</a>
<a href="/contact">Contact</a>
</nav>
</header>This creates a dynamic header that displays your site name and uses the domain for the home link.
Price Display Example
<div class="price-display">
<span class="currency">{{global 'currency_symbol'}}</span>
<span class="amount">{{price}}</span>
<span class="currency-code">{{global 'currency'}}</span>
</div>Displays prices with the correct currency symbol and code, automatically adapting to your site settings.
Conditional Feature Example
{{#if (global 'details.support_system')}}
<div class="support-widget">
<h3>Need Help?</h3>
<a href="/support">Create Ticket</a>
<p>Tickets: {{global 'details.support_limit'}}</p>
</div>
{{/if}}Only shows the support widget if the support system is enabled in your settings.