compuskill Posted March 1, 2007 Share Posted March 1, 2007 Hi there, I have STS installed and I want to use dynamic headers, i. e. the meta description and the meta keywords are supposed to be the categories and/or the products names. If I change that in the sts_template.html, instead of executing the php code in the tags, it just shows the commands: <html> <head> <meta name="keywords" content="<?php echo $seo_product_name;?>"> When I try to insert the code in the sts_display_output.php , all my shop gets messed up, and it doesn't work either. Can anyone post me the correct code? The meta tags are supposed to be like this: <title><?php echo $page_title; ?></title><meta name="keywords" content="<?php echo $page_title; ?><?php if ($seo_product_model){echo ', ';} ?>, <?php echo $seo_manufacturer_name; ?>"><meta name="description" content="<?php echo $seo_product_name . ', ' . $seo_manufacturer_name . ' , ' . strip_tags(TITLE, ""); ?>"> Without STS it works fine. But where do I have to enter that code exactly and how in the sts_display_output.php? ///////////////////////////////////////////// ////// Display Template HTML ///////////////////////////////////////////// // Sort array by string length, so that longer strings are replaced first uksort($template, "sortbykeylength"); // Manually replace the <!--$headcontent--> if present $template_html = str_replace('<!--$headcontent-->', $template['headcontent'], $template_html); // Automatically replace all the other template variables foreach ($template as $key=>$value) { $template_html = str_replace('$' . $key, $value, $template_html); } if ($display_template_output == 1) { echo $template_html; } Thx for your help.... Quote Link to comment Share on other sites More sharing options...
Guest Posted March 1, 2007 Share Posted March 1, 2007 Have you looked into the Header Tag Controller (HTC) contribution?? I've just installed it and from what I can gather so far, it'll do exactly what your trying to do. AND you can change the tags from within the Admin panel. Cheers. Quote Link to comment Share on other sites More sharing options...
compuskill Posted March 1, 2007 Author Share Posted March 1, 2007 Have you looked into the Header Tag Controller (HTC) contribution?? I've just installed it and from what I can gather so far, it'll do exactly what your trying to do. AND you can change the tags from within the Admin panel. Cheers. Uhm, I don't know what contrib I have used for the header tags. I think I have a different one as I don't have a menue for that in the admin panel. So do you know how I can solve my problem? Cya, Compuskill Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.