How can I call function controller from template

Hi, I created a handler and DAO. I created a theme and it’s working OK, but I have a template template1.tpl with link to template template2.tpl on the same directory. /plugin/theme/templates/frontend/pages/

In my handler class:

function index($args, $request) {
$templateMgr->display('frontend/pages/template1.tpl');
}

function getTest($args,$request){
$testing = $args[0]
$templateMgr->assign("testing"=>$testing);
$templateMgr->display('frontend/pages/template2.tpl');
}

In my template1.tpl I have a link

$var1="Hello";
<li><a href="{url router=$smarty.const.ROUTE_PAGE page="getTest op=$var1 }" >Link go template2</a></li>                                      

In my template2.tpl

<h1>Template2</h1>
{$testing|@print_r}

I have 2 questions:

  • How can I call on this link to my function getTest from handler?
  • How can I send variables on this link ? with op ??

Regards,
xavi