0
votes

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' => 'path to flv' );
print theme('jwplayermodule_render_player', $config, $flashVars);

But when i use this code in front-page.tpl.php the code is not working

In node-tpl.php this script is return

<script type="text/javascript" src="/projects/theme/sites/all/modules/drupal/jwplayermodule/jwplayermodule_jwembedder.js?c"></script>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
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": [  ] } } } });
//--><!]]>
</script>

But in front-page.tpl.php not returned

I put <?php print $closure ?> in footer.php and include it in front-page.tpl.php and node.tpl.php

sorry for my bad English

1

1 Answers

1
votes

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!