Module Description
Version 2 Version 2.0.0 is identical to 8.x-1.18. It was only created so we could use semver for releases. All future development will be against this 2.x.x branch. You can upgrade to 2.0.0 without any fears!

About the module This is a small module that gives users some global variables that can be then printed in any twig template. For example, if you wanted to print the current page title as the last menu in a breadcrumb, you could print {{ global_variables.current_page_title }} in breadcrumb.html.twig. It can also be printed in any other template - html.html.twig, page.html.twig, node.html.twig, field.html.twig, etc.

* Table of Contents. * 1) Paths * 1.1) Current Path - {{ global_variables.current_path }} * 1.2) Base URL - {{ global_variables.base_url }} * 2) Current Items * 2.1) Current Page Title {{ global_variables.current_page_title }} * 2.2) Current Langcode {{ global_variables.current_langcode }} * 2.3) Current Langname {{ global_variables.current_langname }} * 3) Site Information Page Global variables * 3.1) Site Name - {{ global_variables.site_name }} * 3.2) Site Slogan - {{ global_variables.site_slogan }} * 3.3) Site Mail - {{ global_variables.site_mail }} * 3.4) Site Logo - {{ global_variables.logo }} * 4) Social Sharing * 4.1) Twitter - {{ global_variables.social_sharing.twitter }} * 4.2) Facebook - {{ global_variables.social_sharing.facebook }} * 4.3) LinkedIn - {{ global_variables.social_sharing.linkedin }} * 4.4) Email - {{ global_variables.social_sharing.email }} * 4.5) WhatsApp - {{ global_variables.social_sharing.whatsapp }}

Alternatives One very flexible way to solve similar issues is to combine Twig Tweak with Custom Token which allows using all global tokens in Twig and to define further custom tokens in the UI.

Project Usage
590
Creation Date
Changed Date
Security Covered
Covered By Security Advisory
Version Available
Production
Module Summary
The module provides global variables that can be printed in any twig template for easy access to site information and social sharing links.
Data Name
mgv

OPENAI CHATBOT

OPENAI CHATBOT

16:29:37
Generic Chatbot
Hi, I'm a Drupal module expert powered by OpenAI, answering your questions about the Drupal module ecosystem. How can I be helpful today? Please note that we will log your question.