spoofy, on 16 October 2010 - 12:26 AM, said:
Well, you don't echo it into product_info. You echo it in template_top within the <head> tag.
Here is how it would work
let's say conditions.php has
$optionalHeadTags = '';
while products_info.php has
$optionalHeadTags = '<script>blah blah blah</script>';
so in template_top.php you will always do (meaning regardless of which page the script is calling)
echo $optionalHeadTags;
this would be placed within the <head> tag obviously.
I hope that makes sense
Yes it does. You mean declare the variable in conditions.php ( or product_info.php or whatever) , above the reference to template_top.php like say,
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);
$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_PRODUCT_INFO));
$optionalHeadTags = '<script>blah blah blah</script>';
require(DIR_WS_INCLUDES . 'template_top.php');
Then echo $optionalHeadTags in template_top.php:
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<?php echo $optionalHeadTags; ?>
<?php echo $oscTemplate->getHeaderTags(); ?>
Edited by npn2531, 16 October 2010 - 01:48 AM.