Early Bird Registration for DrupalCon Atlanta is now open! By registering during our Early Bird Registration window, you’ll save $100. This window ends on 19 January 2025 and will go by quickly, so don’t wait!
Essentially the theme B inherits from the theme A and the theme C (that I develop) inherits from theme B.
Then, at a certain time I've realized that some CSS files provided by the theme B are included after the files provided by my theme (theme C) in this way overwriting my styles. Instead I would like exactly the opposite to happen: I want to overwrite some styles provided by the theme B in my theme C.
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';
}
}