PDA

View Full Version : variable help...I'm lost


Takamine334
02-27-2005, 03:55 AM
I created a template called "footer2". I need it to contain all the copyrights of Jelsoft and the copyrights of a certain hack. I am using this for a portal homepage. The forumhome page contains the regular $footer variable.

I'm having problems getting the $footer2 to show up. How does one implement variables so they show up on certain pages?

I'm thinking this has to do with global.php, but I don't know where to start.

just something I could read, perhaps would really help. I'll do all the homework, I just need to get pointed in the right direction.

noppid
02-27-2005, 04:14 AM
eval('$TEMPLATE_VAR = "' . fetch_template('TEMPLATE_NAME') . '";');

$TEMPLATE_VAR in final template.

Don't forget to cache it. ;)

Takamine334
02-27-2005, 04:23 AM
where in global.php? anywhere?

also, what do you mean by "cache it"?

I assume $TEMPLATE_VAR & 'TEMPLATE_NAME' are usually the same for simplicity purposes.

eval('$TEMPLATE_VAR = "' . fetch_template('TEMPLATE_NAME') . '";');

$TEMPLATE_VAR in final template.

Don't forget to cache it. ;)

hmmm....just tried it and it's not showing up.

Michael Morris
02-27-2005, 09:23 AM
where in global.php? anywhere?

also, what do you mean by "cache it"?

I assume $TEMPLATE_VAR & 'TEMPLATE_NAME' are usually the same for simplicity purposes.



hmmm....just tried it and it's not showing up.

You have to put that code in PHPINCLUDE_START. Read the tutorial linked from my sig for the answers you seek :)

Takamine334
03-01-2005, 07:46 PM
cool, thanks Michael!