|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
pt2002 Smarty Regular
Joined: 05 May 2003 Posts: 89 Location: Porto, Portugal
|
Posted: Thu Aug 14, 2003 4:24 pm Post subject: Need little help with paths |
|
|
Hello
I have some constants defined to access some paths (images) easily.
define('IMG_PATH', '/var/www/site/images/');
When using {section}...{/section} I need to prepend this constant to a field that is the image name.
e.g. In the field I have: photo1.gif. Prepending the constant would have /var/www/site/images/photo1.gif.
If in the {section} I have img src="{/var/www/images/$db[x].img_name}" it works fine and shows the image but I would like to have the constant instead the hard-coded path. I've tried {IMG_PATH$db[x].img_name} but it doesn't work.
Thanks in advance.
Greetings
Rui |
|
Back to top |
|
AZTEK Smarty Pro
Joined: 16 Apr 2003 Posts: 235 Location: Purdue University
|
|
Back to top |
|
pt2002 Smarty Regular
Joined: 05 May 2003 Posts: 89 Location: Porto, Portugal
|
Posted: Thu Aug 14, 2003 9:34 pm Post subject: |
|
|
I think the best answer for my question it would be: Read the (F***) Manual!
Thank you very much for remembering me that.
Have a nice weekend. (Tomorrow it's holiday in Portugal )
Rui |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|