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:
May I ask about best practice. Say I have a content type called Widgets and then I want to have a Widgets page which has a title, maybe some photos and a text based introduction and then below a list of widgets in a grid. I have always created a Basic Page where I have added my introductory content and then I have created a custom page template where I have added a block (which is a views block listing the widgets I want displayed. Is this best practice?