Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

how can access to global variable in volt template

in my index.php i have:

define('SITE_DOMAIN', $_SERVER['HTTP_HOST']);

and i want to access on my volt template:

{{ SITE_DOMAIN }}

but in volt compile:

<?php echo $SITE_DOMAIN; ?>

and the error messsage:

    Notice: Undefined variable: SITE_DOMAIN in /var/www/feedback/app/frontend/views/common.volt.php on line 1

Any Help?



11.5k
Accepted
answer

i have the answers!..

{{ constant("DIRECTORY_SEPARATOR") }}