Simplify getAttribute

Let Twig just handle the function calls, rest just call the attribute on
the item.