Group all smarty assigned variables if a uri exists in smarty function