Rewrite as an element directive.