This forum is for assistance with theme development.

How to add html head link tag when a specific block is loaded

I have a custom block with its twig template suggestion.

I want to add an html head link tag when this block is loaded.
ex: <link rel="import" href="test.html">

In the twig template I can use attach_library to add css/js to , but I don't know how to add html imports in twig.

Is it possible to achieve this using mytheme_preprocess_block function, or any other hook?

A responsive-theme is no longer responsive in a different server

Hi
I hava a weird problem with a drupal theme. I edit an already existing theme css to make it look the way I like it, then I installed it in my server and it's working very well, it's still responsive and everything.
The problem is that i make a zip file of the theme I modified and installed it in a different server, it recognizes the style changes I made but it's no longer responsive, I check the code but I can't find the problem
Both servers are running the 7.40 core

Thanks

adding/changing class to menu & submenu in block

I'm a newbie to Drupal, and building out a first theme. I'd built an intended design in basic html and now I'm converting it to a theme. I'm stuck at the main menu with dropdowns.

I've seen there are two basic ways to add a menu, but both have problems that I'm stumped on.

Method one was to do something along this line:

D8 Custom Block twig template

Hi,

I have a working module that creates a block and themes it but I can't get it to use the twig template in the module's folder. It will load & use one with exactly the same name in the site's theme folder.

The theme suggestion is block--bfsa ( and that's the name that works in the theme ).
I currently have the template that's being ignored in [site]/modules/custom/bfsa/templates

So... where should it live, or is there a hook I need to suggest using the module's template instead of the themes?

Many thanks!

How to override login page?

I followed https://www.drupal.org/node/350634#comment-10569550 tutorial

- I modified 'themes\bartik\template.php' adding function

function bartik_theme() {
$items = array();

$items['user_login'] = array(
'render element' => 'form',
'path' => drupal_get_path('theme', 'bartik') . '/templates',
'template' => 'user-login',
'preprocess functions' => array(
'bartik_preprocess_user_login'
)
...
return $items;
}

HELP !! My Site went wacko

Hello everyone I need some help . I have had this site up for a while and its been good .
I decided to be noisy and when in the settings / themes ,, So i decided to change a theme . So i clicked on one and enabled it

then my website went hay wire .. It doesn't look normal ,, I figured it was because of the change I did . So i went back and put the theme I had originally .
And still my website is www.americanmausoleums.com Can someone tell me what I did wrong .

Pages

Subscribe with RSS Subscribe to RSS - Theme development