Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Question: Sets grav the version to server variable?

Started by Muut Archive 10 years ago · 3 replies · 347 views
10 years ago

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

10 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.

10 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 1354 9 years ago
Archive · by Muut Archive, 9 years ago
2 935 9 years ago
Archive · by Muut Archive, 9 years ago
2 4064 9 years ago
Archive · by Muut Archive, 9 years ago
1 2951 9 years ago
Archive · by Muut Archive, 9 years ago
3 1119 9 years ago