found much better way to test if isCli()!
added View::getPath()