The function backdrop_get_path() is commonly used to lookup the location of a module or theme, since these projects may be installed in a variety of places (/core/modules
, /modules
, /sites/example.com/modules
). Prior to Backdrop 1.2.0, backdrop_get_path() was not able to locate Layout template files, even though they have the same ability to be located in multiple places.
Prior to 1.2.0:
<?php
$path = backdrop_get_path('layout', 'one_column');
echo $path; // NULL
?>
1.2.0 and later:
<?php
$path = backdrop_get_path('layout', 'one_column');
echo $path; // core/layouts/one_column
?>
Introduced in branch:
1.2.x
Introduced in version:
1.2.0
Impacts:
Module developers
Related Github Issues: