template related question..

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ravindra
Forum Newbie
Posts: 2
Joined: Thu Jun 15, 2006 4:35 am

template related question..

Post 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.
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

Moved to PHP Code.

What's your question?
User avatar
MrPotatoes
Forum Regular
Posts: 617
Joined: Wed May 24, 2006 6:42 am

Post by MrPotatoes »

do your logic in PHP and not in code.
ravindra
Forum Newbie
Posts: 2
Joined: Thu Jun 15, 2006 4:35 am

Post 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.
Post Reply