CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Insert JS into Header
Pages: [1]

Author Topic: Insert JS into Header  (Read 1883 times)

JoopSJ

  • I post occasionally
  • **
  • Posts: 80
  • Karma: 2
Insert JS into Header
May 15, 2009, 03:46:50 pm
Hello,
I have some JS-code I use in tabbed.tpl.
I would like to inject the script into
Code: [Select]
<head></head>Can anyone tell me wich template file builds the HEAD section?
Or is there a Smarty-function to do it out of tabbed.php?
Thanx
(Comfortable with drupal's PHPtemplate, just learning Smarty now!)

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Insert JS into Header
May 15, 2009, 03:51:54 pm
You can add / include your file in civicrm.module, civicrm_html_head();

Kurund
Found this reply helpful? Support CiviCRM

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Insert JS into Header
May 15, 2009, 05:40:28 pm

depends on where the files are stored etc, you can use the drupal functions (drupal_add_js etc) to add relevant stuff to the head section. check the drupal docs for more detail

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Insert JS into Header

This forum was archived on 2017-11-26.