A View is an object, so it's quite logical that object Page2 can not access properties of object Page1. There is no automatic inheritance of properties if one view file includes another.
Personally I don't think a view should contain code, it should only contain HTML and simple related display logic, like an if or a foreach.
But if you insist, you can pass data along like so: