It all has to do with when the code is run and when the template is 'made'. If the footer template is spit out prior to the code being run, then your variables are not available at the time the footer is 'made' and so nothing will be spit out then. So, if you want the variables to be available in another template, you need to make sure that template has those variables available to it. If not, you will have to see if you can run the code earlier in the page to have those variables available. Sometimes this isn't as easy as it sounds.
|