PDA

View Full Version : difference function in the same template


vietfancy
01-18-2009, 04:07 AM
I need a little help!

How to have more than one function in the same template?

in stead of use 2 templates as below, is there anyway that we can just use 1 template?

if ($_REQUEST['do'] == 'this')
{
eval('print_output("' . fetch_template('do_this') . '");');
}

if ($_REQUEST['do'] == 'that')
{
eval('print_output("' . fetch_template('do_that') . '");');
}

Dismounted
01-18-2009, 04:28 AM
You shouldn't stuff everything into one template. There is just no need.

vietfancy
01-18-2009, 05:04 AM
there're several things i really need to dump into just one template :D

Dismounted
01-18-2009, 05:06 AM
Why?

Without seeing exact code, I can't give you an opinion on much...