Everything depends on your structure and your needs.
You can do it for example this way:
In PHP
<?php
$currentUrl = $_SERVER['REQUEST_URI'];
if($currentUrl == 'signup.php') { // notice that there are 2 = signs not one to compare
$t->assign('rendered_page', $t->fetch('signup.tpl') );
else {
$t->assign('rendered_page', $t->fetch('login.tpl') );
}
$t->display( 'index.tpl' );
In index.tpl
{$rendered_page}
But you can also do it this way (simple displaying template not fetching first):
In PHP
<?php
$currentUrl = $_SERVER['REQUEST_URI'];
if($currentUrl == 'signup.php') { // notice that there are 2 = signs not one to compare
$t->display('signup.tpl');
else {
$t->display('login.tpl');
}
The last option is putting this directly in Smarty template, so you can do it this way:
in PHP
<?php
$currentUrl = $_SERVER['REQUEST_URI'];
$t->assign('currentUrl', $currentUrl);
$t->display('index.tpl');
In index.tpl
{if $currentUrl eq 'signup.php'}
{include 'signup.tpl'}
{else}
{include 'login.tpl'}
{/if}