Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Question: Sets grav the version to server variable?

Started by Muut Archive 11 years ago · 3 replies · 527 views
11 years ago

To get the grav version outside grav with twig like: PHP Version {{ constant('PHP_VERSION') }} and Twig Version {{ constant('Twig_Environment::VERSION') }}.

11 years ago

Thanks, this is the internal define. I can´t get this outside of grav, but i have the follow solution:

$parent_dir = dirname(DIR);
include($parent_dir . '/grav/system/defines.php');

This code at my external programm gets the defines of grav and i can use the aktual GRAV_VERSION automaticly for showing at my frontend.

11 years ago

Ok cool, sorry i misunderstood your question. Glad you got it sorted.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 2602 9 years ago
Archive · by Muut Archive, 9 years ago
2 1711 9 years ago
Archive · by Muut Archive, 9 years ago
2 5005 9 years ago
Archive · by Muut Archive, 9 years ago
1 3836 9 years ago
Archive · by Muut Archive, 9 years ago
3 1818 9 years ago