Created
March 13, 2019 08:42
-
-
Save radheymkumar/4c3dbe8876f86d494bc028cced84c074 to your computer and use it in GitHub Desktop.
Get Setting.php Variable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Settings.php | |
$settings['hello_world'] = 'Radheshyam Kumar Kumawat'; | |
//bartik.theme | |
function bartik_preprocess_page(&$variables) { | |
$variables['setting_name_value'] = Settings::get('hello_world', 'my drupal setting name'); | |
} | |
//page.html.twig | |
{{ setting_name_value }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment