flatten view directory structure