Added hook to view_factory.