Amazzing Posted January 7, 2014 Share Posted January 7, 2014 I have a module with /img subfolder, where images are stored in the following order: mod1.jpg, mod2.jpg, mod3.jpg etc. admin.tpl is responsible for displaying informations in backoffice. So, my goal is to display imageX.jpg through admin.tpl if it exists in module/img/.(X variable is accessed by {$myid} in admin.tpl) I know I could use {if file_exists... But what would be the best way to define the relative location of module/img folder? Link to comment Share on other sites More sharing options...
Er.Ritesh Posted January 7, 2014 Share Posted January 7, 2014 Hello Amazzing please view on this url: http://www.prestashop.com/forums/topic/144197-solved-check-if-file-exists-so-that-i-can-link-to-a-product-file-form-a-directory/ Link to comment Share on other sites More sharing options...
Amazzing Posted January 9, 2014 Author Share Posted January 9, 2014 Hello Amazzing please view on this url: http://www.prestashop.com/forums/topic/144197-solved-check-if-file-exists-so-that-i-can-link-to-a-product-file-form-a-directory/ I have seen this topic. And if you look carefully, you can see, that I even left a reply there in march 2013. My question was about defining the relative location of module/img folder. Anyway, I chose another way, and decided to check if file exists in php and after that assign a corresponding value to smarty. Link to comment Share on other sites More sharing options...
vekia Posted January 14, 2014 Share Posted January 14, 2014 have you tried with {$content_dir} variable as a path to main directory shop? it's worth to check it with this one 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