<?php
function smarty_function_snippet($params, &$smarty)
{
    if (!function_exists('get_instance')) {
        $smarty->trigger_error("url: Cannot load CodeIgniter");
        return;
    }
    $CI = &get_instance();
    return $CI->snippets->get($params['namespace']);
}