preerp10 Posted November 18, 2011 Share Posted November 18, 2011 I want to create a CMS page that uses javascript that needs to go in the head of the document. Is there a right or wrong way to do this through the CMS or prestashop or can I just go into the document itself and add it without worrying about it fouling up prestashop? Link to comment Share on other sites More sharing options...
tomerg3 Posted November 18, 2011 Share Posted November 18, 2011 You can edit header.tpl (in the theme folder) and add you code there. You can limit it on to the CMS page by adding the following around the JS code {if $page_name == "cms"} ..... {/if} Make sure to clear your smarty cache. Link to comment Share on other sites More sharing options...
preerp10 Posted December 2, 2011 Author Share Posted December 2, 2011 Ran into a few problems. When I followed your instructions, it worked. The script, that is. However all of the product categories became expanded on the left menu. When I took the script out, that problem went away. When I set it to CMS only, the problem reappeared just on the cms pages. I can live with the menus all expanded but only on one of the CMS pages. What if anything can I do to get the script to run on a specific page only or better yet, maybe you know how to keep it from making the menus expand. Link to comment Share on other sites More sharing options...
Recommended Posts