1 reply [Last post]
RonStar's picture
User offline. Last seen 21 weeks 4 hours ago. Offline
Joined: 03/22/2010

Hey there,

I want to embed a flash object into the theme (replacing the featured- & Dynamic Dispaly Block).

For that, I need to embed some Javascript/jquery called swfobject.js

I am not sure where to embed this Javascript. In a regular html-file, it would be just copied to the head-area. What do I have to do to embed this piece of Javascript?

And, where do I insert the the flash-container? In this case, I would do in page.tpl.php in line 125. Is that right?

Thanks for your help!

Rob D.'s picture
User offline. Last seen 10 hours 8 min ago. Offline
Joined: 04/09/2008

I usually include the js imports in the template.php file - if you placed swfobject inside of the theme's /js/ subfolder, and then added the follow line to template.php it should import it:

drupal_add_js(drupal_get_path('theme', 'deepsea') . '/js/swfobject.js', 'theme');

The flash container would replace everything between line 123 and 131 in page.tpl.php.

Hope this info helps!

Support hours: 9AM - 5PM EST, Mon - Fri

Follow us on: