i am given ready template code in PHP. i needs to change it. have some problem. the files are .TPL and .INC.PHP extension files. i want to know whether we can write any conditions like if (...) {}
in template code. Image is displayed in .TPL file. i want to check if image is not there it should be skipped.
I will be thankful to you.
Regards,
ravi.
template related question..
Moderator: General Moderators
- MrPotatoes
- Forum Regular
- Posts: 617
- Joined: Wed May 24, 2006 6:42 am
Code is in php only. logic of assigning variables is in .inc.php file. e.g. for login there will be 2 files. login.inc.php and login.tpl.
Now tpl contains variables e.g. {LANG_LOGIN_ID} . These variables are set in login.inc.php file.
My question is i have {IMAGE_CATEGORY} set in template. its value is set in .inc.php file. It is used in .TPL file to display image. I want to check if this variable is empty, then i dont want to display any image or dont want to show alternative text, just want to skip.
Thanks, waiting for reply,
ravi.
Now tpl contains variables e.g. {LANG_LOGIN_ID} . These variables are set in login.inc.php file.
My question is i have {IMAGE_CATEGORY} set in template. its value is set in .inc.php file. It is used in .TPL file to display image. I want to check if this variable is empty, then i dont want to display any image or dont want to show alternative text, just want to skip.
Thanks, waiting for reply,
ravi.