Problem with swfobject_api or jwplayer module I have a problem with swfobject_api or jwplayer module.

When I use this code in node.tpl.php everything is fine.

$config='sample';
$flashVars=array( 'file' =&gt; 'path to flv' );
print theme('jwplayermodule_render_player', $config, $flashVars);


When I use this code in front-page.tpl.php the code is not working.

In node-tpl.php this JavaScript is added.

&lt;script type="text/javascript" src="/projects/theme/sites/all/modules/drupal/jwplayermodule/jwplayermodule_jwembedder.js?c"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
&lt;!--//--&gt;&lt;![CDATA[//&gt;&lt;!--
jQuery.extend(Drupal.settings, { "jwplayer": { "files": { "jwplayer-1": { "flashplayer": "http://localhost/projects/theme/sites/default/files/jwplayermodule/player/player.swf", "width": "400", "height": "280", "controlbar": "bottom", "wmode": "opaque", "file": "/projects/theme/sites/default/files/1057680_0.flv", "config": "http://localhost/projects/theme/sites/default/files/jwplayermodule/configs/sample.xml", "events": [  ] } } } });
//--&gt;&lt;!]]&gt;
&lt;/script&gt;


In front-page.tpl.php, it is not added.

I put &lt;?php print $closure ?&gt; in footer.php, and included it in front-page.tpl.php and node.tpl.php.
Your template file should be called page-front.tpl.php, not front-page.tpl.php. Once you've renamed it flush your caches and it will work!