Adding site/home/front link in block content
I have just migrated to D9.
I need to add site/home/front link in custom block content.
In D7 this used to be easy: adding a site to site front (using PHP snippet):
<a href="<?php global $base_path; print $base_path; ?>" Go to this link </a>
I can’t figure out how to do this in D9 since twig codes don’t work here.
Can anyone suggest what to do?
This article was republished from its original source.
Pixeldust is a 20-year-old web development agency specializing in Drupal and WordPress and working with clients all over the country. With our best in class capabilities, we work with small businesses and fortune 500 companies alike. Give us a call at 1(800)730-2416 and let’s talk about your project.