Why not just roll your own function:
function updateSmarty($smarty, $templateVar, $key, $value) {
$templateVars = $smarty->getTemplateVars($templateVar);
$templateVars[$key] = $value;
$smarty->assign($templateVar, $templateVars);
}
Then you can one line it where you need it:
updateSmarty($smarty, 'header', 'showNav', true);
Or even:
function showNav($smarty) {
updateSmarty($smarty, 'header', 'showNav', true);
}
Then:
showNav($smarty);