jonsecu Posted July 31, 2012 Share Posted July 31, 2012 I am trying to install on a theme I am developing the code to call a js script on the header. I am looking for a Smarty function that returns the template`s url or the js folder, so I can add the relative route from there to my js file. Is this possible? Thanks. Link to comment Share on other sites More sharing options...
jonsecu Posted July 31, 2012 Author Share Posted July 31, 2012 Hi... I am new to prestashop. I am trying to include a call to a script on the header.tlp. I am looking for an smarty tag that returns the theme URL so I can manually add the complementary path to my js file. There are similar functions like these on Wordpress such as this one: <img src="<?php bloginfo('template_directory'); ?>/images/headers/image.jpg" /> It returns the template directory so I can add the relative path from there to my file to include on the header. Is there a function that does the same job on Prestashop? Thanks. Link to comment Share on other sites More sharing options...
Médéric Posted July 31, 2012 Share Posted July 31, 2012 Hello, <script type="text/javascript" src="{$js_dir}jquery.carousel.js"></script> For more information about the global variables: http://www.prestasho...-in-prestashop/ best regards, mb Link to comment Share on other sites More sharing options...
math_php Posted August 1, 2012 Share Posted August 1, 2012 Hi You can use src="{$base_dir}theme_name/script.js" Only if the 'theme name' does not change Good dev Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now