Creating a Drupal node template for Flash

Moving back to Drupal, our next task is to take our compiled Recipe Flash application and integrate it into our Drupal system. We will start out by doing the same thing we did in the previous chapters, and add our Flash application to our Drupal web site using the FlashNode module.

We can do this by simply going to Create Content | Flash, and then selecting our new SWF file where it asks for the Flash file. We can then click on the Save button to submit this Flash application to our Drupal system. It is very important, at this point, that we remember the node ID that was created for our Flash node. We can determine the node ID by looking at the URL and taking note of the number that comes after http://locahost/drupal6/node/. With our Flash application in place, we now run into a unique situation that differs from the previous chapters.

In order to get our Recipe application to work as expected, we need to show the Flash application when anyone visits a recipe node. However, the FlashNode module attaches our SWF file to a completely separate node type called Flash, and not Recipe. In order to show that Flash application within a Recipe node type, we will need to create a node template for our Recipe node, where we will then reference the Flash application we just submitted using the FlashNode module. We can also utilize this template to pass in the node ID of the recipe that they are viewing. To accomplish this goal, we will use a very popular module for Drupal called Contemplate.

Article Marketing Knockdown

Article Marketing Knockdown

The lifeblood of any online business is in being able to generate highly targeted, consistent traffic to your websites, landing pages and squeeze pages.

Get My Free Ebook


Post a comment