My problem is i have serveral Templates which i parse through to build my site.
Everything works fine.
But if i want to use a function or a class (ie class news) with the function showallnews.
which should print out all news
it wont make use of a template.
I dont know why. even if i gave the template object to the function it wont work
(i.e. printallnews($t))
my problem is that i parse and append serveral templates.
And when i try to use functions insteed to parse the files (with the same code) it wont work :(
any suggestions ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My problem is i have serveral Templates which i parse through to build my site.
Everything works fine.
But if i want to use a function or a class (ie class news) with the function showallnews.
which should print out all news
it wont make use of a template.
I dont know why. even if i gave the template object to the function it wont work
(i.e. printallnews($t))
my problem is that i parse and append serveral templates.
And when i try to use functions insteed to parse the files (with the same code) it wont work :(
any suggestions ?
It sounds like you haven't accounted properly for variable scope. If you would like specific help, post some examples.