Does anyone of you know a way to get the panel version information outside the panel (e.g. in a template or plugin)?
Maybe a more elegant way than:
require 'panel/app/panel.php';
version_compare(panel::$version, '2.2.0')
Not quite happy about requiring the whole panel.php.
Thereβs no other way, because the Panel code is not loaded by Kirby. Loading the panel.php
manually is least amount of code parsing required.
But Iβd recommend using require_once
to make sure you donβt accidentally load the file twice (which would result in an error).
1 Like