Modifications to templates not taking affect

The release related discussions, plans and questions.
Locked
jbrown2197
TestLink user
Posts: 6
Joined: Wed Jan 09, 2008 9:51 pm

Modifications to templates not taking affect

Post by jbrown2197 »

I am making changes to the mainpage.tpl and when I refresh my browser nothing changed.
I found that if I modify the #@@@#%$#mainpage.tpl.php in the templates_c directory things change.
After doing some digging it looks like Testlink recompiles a tpl file, but how do you force it to recompile, or is there a way just to get it to use the mainpage.tpl?

After I initially installed Testlink I was able to see changes right away, I'm not sure what changed.
I'm using this with an IIS server, I'm not sure if that matters.
havlatm
Member of TestLink Community
Posts: 940
Joined: Mon Oct 31, 2005 1:24 am
Location: Czech

Post by havlatm »

Delete templates_c directory if you modify templates. This behaves as cache.
jbrown2197
TestLink user
Posts: 6
Joined: Wed Jan 09, 2008 9:51 pm

Post by jbrown2197 »

Thanks. I did try that and then refreshed my browser, and it was just a blank page. How long does it take for the templates_c to recompile? Is there a way to force the recompile?
havlatm
Member of TestLink Community
Posts: 940
Joined: Mon Oct 31, 2005 1:24 am
Location: Czech

Post by havlatm »

Yes.
iggy
TestLink user
Posts: 6
Joined: Fri Apr 11, 2008 5:48 pm

Post by iggy »

havlatm wrote:Yes.
What are the steps to force a recompile?
jbrown2197
TestLink user
Posts: 6
Joined: Wed Jan 09, 2008 9:51 pm

Post by jbrown2197 »

I found out how to do this.
You have to browse to third_party->smarty and open Smarty.class.php

In Smarty.class.php search for 'compile'.
Change the 'var $compile_check' to true
Change the 'var $force_compile' to true
and save the doc.

This is good when you're making changes, but when you are ready to use this for run time set both of these to FALSE and it will improve the speed of Testlink.
I hope that helps.[/quote]
iggy
TestLink user
Posts: 6
Joined: Fri Apr 11, 2008 5:48 pm

Post by iggy »

Awesome -- thanks for the info! :D
jbrown2197
TestLink user
Posts: 6
Joined: Wed Jan 09, 2008 9:51 pm

Post by jbrown2197 »

No problem, if you want more how-to for programming under smarty, there's plenty to read here: http://www.smarty.net/
and it's very useful info, saved me a lot of time.
Locked