added smarty3 support.