Jump to content

What is the best way check if file exists in module/img folder


Amazzing

Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...