Add helpers to smarty env + uri detection