By editor, 18 January, 2016 Question How to get the site name and host name (site address) in Drupal 8 ? Site Name: $site_name = \Drupal::config('system.site')->get('name'); Site Address (Host) $site_addr = "http://" . \Drupal::request()->getHost(); Tags Drupal 8 Code Comments You must have JavaScript enabled to use this form. Your name Subject Comment About text formats Text format Plain textBasic_html Plain text No HTML tags allowed. Lines and paragraphs break automatically. Web page addresses and email addresses turn into links automatically.
Comments