dstu Posted September 5, 2006 Share Posted September 5, 2006 Hello, I'm trying to integrate php-layers-menu in mySTS based osc site. the menu requires some code (javascript, html and php requires) in the head section and some in the body. Using STS, I'm forced to put every above the </head> inside the $template['headcontent'] (otherwise if I put these tags in the $masthead, they are stripped out). The problem is that I have some PHP code that I need to run. Doing this doesn't work: $template['headcontent'] .= '<script language="JavaScript" type="text/javascript">' . "\n"; $template['headcontent'] .= '<?php' . "\n"; $template['headcontent'] .= 'require_once \'/libjs/layersmenu-browser_detection.js\';' . "\n"; $template['headcontent'] .= ' ?>' . "\n"; $template['headcontent'] .= '</script>' . "\n"; Can anyone tell me what I should do? Thanks, David Quote Link to comment Share on other sites More sharing options...
bkellum Posted September 7, 2006 Share Posted September 7, 2006 Hello, I'm trying to integrate php-layers-menu in mySTS based osc site. the menu requires some code (javascript, html and php requires) in the head section and some in the body. Using STS, I'm forced to put every above the </head> inside the $template['headcontent'] (otherwise if I put these tags in the $masthead, they are stripped out). The problem is that I have some PHP code that I need to run. Doing this doesn't work: $template['headcontent'] .= '<script language="JavaScript" type="text/javascript">' . "\n"; $template['headcontent'] .= '<?php' . "\n"; $template['headcontent'] .= 'require_once \'/libjs/layersmenu-browser_detection.js\';' . "\n"; $template['headcontent'] .= ' ?>' . "\n"; $template['headcontent'] .= '</script>' . "\n"; Can anyone tell me what I should do? Thanks, David Try placing the javascript in your store's default javascript folder in admin. This is where sts pulls all the default javascript for a stock version of osc from. Hope this helps, Bill Kellum Quote 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...
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.