bkellum Posted March 30, 2007 Share Posted March 30, 2007 I need to incorporate a different flash movie in the header per each category. So far, this is the only way I can think of to make this work (there has to be a better way): I create my flash movie as below: default.swf (default movie that will be seen on all non-catalog pages such as the home page, privacy, shipping, contact us, etc.) movie_cat1.swf (flash movie for category 1) movie_cat2.swf (flash movie for category 2) movie_cat3.swf (flash movie for category 3) etc. (follow suit for each category name) Now, I will create a duplicate copy of header.php and modify it so that it brings up the correct flash movie. I will follow this format: header.php (default header that will be seen on all non-catalog pages such as the home page, privacy, shipping, contact us, etc.) header1.php (header that will show flash for category 1) header2.php (header that will show flash for category 2) header3.php (header that will show flash for category 3) etc. (follow suit for number of categories in shop.) I then add this code in my different pages where I need the amended header.php: <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header2.php'); ?> <!-- header_eof //--> I change the '2' to whatever header above that I want to include. Is there a better way of doing the above by creating some auto generating code in the header.php file to choose which flash movie to play depending upon which category page is being viewed? If so, this would at least save me from having to create a separate header.php, header1.php, header2.php, etc. I realize I will still need to have a flash movie for each category to be pulled in dynamically but if I could save some coding by not having to create the several header files would be great. I'm already utilizing the category images in the category.php files so I can't use the tep image swf swap contribution. Any ideas or maybe even a better way of accomplishing a different header flash movie per category? Thanks for any input, Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE Link to comment Share on other sites More sharing options...
This topic is now archived and is closed to further replies.