SkyPHP/skyphp — pull request #33 by stanistan (2012-03-29 15:58:40+00:00)
Title: Stan

Added the ability for a page to inherit from another page.

---

#### Example:

```php
inherit('includes/user');

// in path -- pages/admin/user

$p->inherit('includes/user', array('is_admin' => true));

```

If the requested page is `/user/343/songs` and the path `includes/user/_user.id_/songs/songs.php` exists, it will use that as the `page`. Also `/admin/user/343/songs` would use the same inherited page.

Can also pass `$__data__` to the inherited page wich should be an associative array that will be pushed into the page's scope by:

```php
$v) $$k = $v;
unset($__data__);

```