Add View middleware