Page 1 of 1
template related question..
Posted: Thu Jun 15, 2006 4:45 am
by ravindra
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.
Posted: Thu Jun 15, 2006 6:36 am
by JayBird
Moved to PHP Code.
What's your question?
Posted: Thu Jun 15, 2006 7:04 am
by MrPotatoes
do your logic in PHP and not in code.
Posted: Thu Jun 15, 2006 7:54 am
by ravindra
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.