By artatum on
Hello
I'm trying to insert this in My Bartik theme:
<script type="text/javascript" src="http://fast.fonts.com/jsapi/2a9498d-8cb0-2d03ef43.js"></script>
into head tag.
I've read a lot of stuff here, talking about drupal_add_js. But I dont understand where and how to use this in my case... Everybody talk about template.php, but there is only functions in it... Moreover I dont see how using it with external script...
Any help welcome.
Comments
drupal_add_js
http://api.drupal.org/api/drupal/includes--common.inc/function/drupal_ad...
drupal_add_js('http://example.com/example.js', 'external');http://api.drupal.org/api/drupal/includes--common.inc/function/drupal_ad...
Thx for helping ! But I've
Thx for helping !
But I've read this thread before asking. Where should I put this drupal_add_js for including it in every bartik's page?
Artatum
www.ixxi-mobility.com
After reading the second link
After reading the second link it seems that I should add a
function bartik_preprocess_page into template.php?
Is this correct ?
Artatum
www.ixxi-mobility.com
Yes, this is one way to do
Yes, this is one way to do it.
It would be best to add the
It would be best to add the code to your own "helper" module. That way you are not modifying the theme. Alternatively, you could extend the Bartrik theme.
Right : I see now my
Right : I see now my declaration into head tag. Cool, you saved my day! Thx again ;-)
(the issue is now that my font is not showing up... but it's another matter!)
Artatum
www.ixxi-mobility.com
@benmalen What do you mean
@benmalen What do you mean by helper module ? That you always build a helper.module in which you put whatever you need for customizing things ?
Artatum
www.ixxi-mobility.com
Yes, for each site I build I
Yes, for each site I build I make a small module to do certain customizations. There are modules for everything, but sometimes only a few lines of custom code are needed.
Thx for the trick! I'm gonna
Thx for the trick! I'm gonna do the same...
Artatum
www.ixxi-mobility.com