Use flash node content in a template

Last modified: February 23, 2008 - 23:14

You can use flash node as a relatively easy way to add flash content to a template. To do this create the flash node and note the node number. You can also set the flash node status to unpublished to avoid it appearing on the site as an item of content in its own right.

Then, edit the appropriate template file, and where you want the flash item to appear put:

<?php
print flashnode_content(array('nid' => nnn));
?>

where nnn is the node number.

You can pass other parameters by adding them to the array. The function will take any parameter that is available in the flash node macro format, e.g.

<?php
print flashnode_content(array('nid' => nnn, 'height' => 100, 'width' => 100));
?>

Flash node will take care of all the embedding code, again using either the default built in method, or the method you select with SWF Tools.

 
 

Drupal is a registered trademark of Dries Buytaert.