How can I dynamically add URL or taxonomy to body class

28/06/2018


Am creating my own theme and have successfully added the URL into the node class in node.html.twig with {% set classes = [ ‘url’ ~ url|clean_class, ] %} but I need to be able to style each page individually as a whole, not just at the node level – how do I add the URL or the taxonomy of the node to the page or body classes?

قالب وردپرس