Monday 31 May 2010 7:53:54 am
Hello, I tried to find similar posts but couldn't find any information about it. I am using a module with /extension-name/search which loads the search template with the $tpl->setVariable( 'show_result', 0). This is working fine. In the TPL file I have a form that submits to same module which makes a DB Query and returns the result. The result is working fine and I can echo different results from the script that verifies when a result was made and when nothing was found. But the $tpl->setVariable( 'show_result', 1) doesnt work (I thought). Now I think it works and the template is just being cached and ignores the template update value. How can I force the template to update on every query? My test was simple with this code: if ($_POST) { echo "Returned post"; $tpl->setVariable( 'show_result', 1); } else { echo "no post was made"; $tpl->setVariable( 'show_result', 0); } When I write {$show_result} in template it shows 0. But after $_POST I can see "Returned post" but it still prints 0. Is is possible to disable cache for only this page and cache all others? Is it a cache problem or a code issue? I don't know where to look, if to cache or to my code. Best regards, Håkan Bergman
|