1
Hi All,
I have a small piece of code that I am looking to have executed at the end of every single page, regardless of any cache settings that might be set at block or module level. To do this I have tried using the
smarty insert tag in footer.php, but as yet am not having any luck. I'm not sure if it is placement of my code, or if footer.php is not the best place for it, but it seems that my code using the insert tag are still being cached.
I entered the following code on line 31 of footer.php;
function insert_test()
{
$Test='test';
return $Test;
}
I then added the following in my theme.html file;
<{insert name='test'}>
As you'd expect this returns the word
test where the insert tag is placed, however, with module caching enabled it is still not displayed when coming from cache, which to me means the code is not being executed. It was my impression that bybassing of cache, and forcing the code execution was what the insert tag was specifically intended for, so I can only assume I've stuffed it up here somewhere.
It is obvious that what I'm wanting to do can be done as the $xoops_footer tag for example is not cached regardless of any caching settings, so I was just looking for a bit of a hand here.
*Edit*
Ok, it would seem that $xoops_footer is cached, it's just that anytime it is changed the cache is cleared. This is slightly different to what i'm after as I want everything else to be cached APART from the insert tag.