Add method for handling custom views for a document