AudioPro Posted June 11, 2010 Share Posted June 11, 2010 I'm trying to figure out how to change the link location for the main logo in the header.tpl file. The default setting is on line 47 as follows.... this points to the directory /prestashop/img but what I want to do is have it point to the following directory; /prestashop/themes/mytheme/imgI've googled myself silly and tried every single thing I could think of but nothing seems to work. I'm trying to hard code and store as much of my work in my theme directory as possible so going to admin and uploading the file really wont work in my situation.-Carl Link to comment Share on other sites More sharing options...
marty69 Posted June 11, 2010 Share Posted June 11, 2010 Hi,The variable {$img_ps_dir} is set to /prestashop/img directory.Use the variable {$img_dir} which is set to /prestashop/themes/yourtheme/imgif you want to use a custom directory from the prestashop themes image base, use for instance {$img_dir}your_path/your_image.jpg 1 Link to comment Share on other sites More sharing options...
AudioPro Posted June 11, 2010 Author Share Posted June 11, 2010 oh sweet, thanks a ton!!! changing only the img_dir part did the trick! I didn't need any of the extra path info at all.What I wound up doing was changing {$img_ps_dir}logo.jpg to the following....{$img_dir}my_image.jpgAnd this will work with other images and tpl files as well such as buttons, sprites, product images, or whatever other image location i want to change?-Carl Link to comment Share on other sites More sharing options...
marty69 Posted June 11, 2010 Share Posted June 11, 2010 Yes, prestashop switch these variables to their values when executed to generate the HTML page code.Use that kind of variable as it makes your code adapted to your configuration path whenever your base url is so you dont have to change it when you change your hosting directory for exemple...if you want to know more about other variables that might exist you can check init.php in your root directory as these variables are set in that file. 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