The Drupal API has drupal_get_path($type, $name)
which will give the path of any particular theme or module. What if I want the path of the current theme?
Bartik is the default theme for Drupal 8.
Themes in Drupal sites. Themes are what make a Drupal website look the way it does. Themers, or theme developers, use HTML, CSS, JavaScript, and other front-end assets in order to implement a design for their site. Each individual theme is a collection of files that define the presentation layer for your application.
Each theme provides a set of named regions, such as Header, Content, and Sidebar, where site builders may choose to place their content.
Use the path_to_theme
function.
this should work (doc):
global $theme; $path = drupal_get_path('theme', $theme); // there's also a $theme_path global global $theme_path;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With