I want to use base path
the base path in drupala Drupal 8 in twigtemplate file,. I try followingstried the following, but no one return anythingI don't get the correct result.
{{ app.request.baseUrl }}
{{base_path}}
whatWhat I need is the absolute path to the node {{ app.request.baseUrl }}/{{ url }}
.
oneOne solution put thisI found is putting this code in preproccess
a preprocess hook, and pass it to the theme.
$host = \Drupal::request()->getHost();
$response = \Drupal::httpClient()
but I looking for better solution I am looking for a better solution. What could should I use instead of the one I am using?