Global Variables Documentation

🌐 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

Syntax
πŸ’»

How to Access Global Variables

Use the Handlebars helper syntax to access any global variable in your templates:

{{global'variable_name'}}

πŸ“Œ Example: Displaying the site name

<h1>Welcome to

{{global'site_name'}}</h1>
Variables
🌐

Basic Site Information

πŸ”—
domain

Site domain name

🏷️
site_name

Site name/title

πŸ’°
currency

Default currency code

πŸ’Έ
currency_symbol

Currency symbol

πŸ“Š

Site Statistics

πŸ›’
orders_count

Total number of orders

πŸ‘₯
users_count

Total registered users

🎨

Display Settings

πŸ”’
price_round

Decimal precision for prices

βš™οΈ

Feature Settings

Access via details object

πŸ‘€ User Account Features

details.name_field
Name field enabled
details.phone_field
Phone field enabled
details.mail_verify
Email verification status
details.sms_verify
SMS verification status

πŸ”’ Security Features

details.two_factor
2FA availability
details.two_factor_mandatory
2FA mandatory status
details.theft_prevention
Anti-theft measures
details.user_tracking
User tracking status

πŸ“¦ Order & API Settings

details.auto_refill
Auto-refill status
details.api_status
API enabled status
details.failed_order
Failed order handling
details.auto_complete
Auto-complete orders

πŸ’³ Payment & Support

details.bank_payment
Bank payment status
details.online_payment
Online payment status
details.support_system
Support system status
details.support_limit
Support ticket limits
Examples
πŸ’‘

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.

Was this page helpful?