I created a local Drupal 10 site using ddev and Docker Desktop, and then I created a subtheme using drush:
ddev drush generate theme
But for some reason, once I wrote my CSS files, none of the CSS changes are being reflected on the website. The website is frozen with the default look of the subtheme (before I made my CSS changes).
I have generated a new theme in Drupal 10 and am now modifying twig files. I have created a page--front.html.twig file from page.html.twig and am now making modifications to it. As part of the modifications, I want to change the css class layout-content to have a background color and thus replaced occurrences of layout-content with my-layout-content in this twig.html file
I'm trying to change all occurrences of target="_blank" in my site's content but when using the link_alter hook it only seems to effect the admin menu.
Which hook should I use?
What I've tried
function MYNAME_module_link_alter(&$variables) {
if (isset($variables['options']['attributes']['target']) && $variables['options']['attributes']['target'] == '_blank') {
$variables['options']['attributes']['target'] = '_self';
}
}
I am running Drupal 10 with Domain Access and was playing around with themes.
First, changing themes with domain-specific configuration wouldn't always work. Changing the theme with domain configuration disabled would work, for all subdomains.
Then, I tried the Domain Theme Switch module. Themes would change, but I could not configure them.
how is it possible to get the #markup value for twig treatments, before it could be formatted by other processes than the 'human_decimal' I need?
dump() show this structure: