I have a "links.tpl" file which contains lines with many variables such as below
{assign var=link_main value="index.php"}
{assign var=link_login value="?a=login"}
{include file="file.tpl"}
{$link_main}, {$link_login}
{assign var=link_main value="index.php"}
scope=global
What you're doing should work. Testing on my Mac:
File test/testInclude.tpl
{assign var='assignedVar' value='foo' scope='global'}
assignedVar in child is {$assignedVar}
<br/>
File test/test.tpl
{include file='test/testInclude.tpl'}
{if isset($assignedVar)}
assignedVar is set in parent {$assignedVar}
{else}
assignedVar is not set in parent
{/if}
<br/>
Outputs
assignedVar in child is foo
assignedVar is set in parent foo
That really should work - if not then there's something really weird going on with your instance of Smarty. Could it be that the template is being cached and not being regenerated when the variables are changed?
Obviously you should figure out what's going wrong, but if all else fails you could also use the alternative capture function.