PHP code example of bringyourownideas / inheritage-by-sitetree
1. Go to this page and download the library: Download bringyourownideas/inheritage-by-sitetree library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
bringyourownideas / inheritage-by-sitetree example snippets
/**
* In the SiteTree this page will be directly under the homepage.
*
* URL structure /landing
*/
class LandingPage extends Page
{
/**
* @var array
*/
$db = [
'Color' => 'Varchar',
];
}
class LandingPage_Controller extends Page_Controller
{
/* ... */
}
/**
* In the SiteTree this page will be directly under the landing page.
*
* URL structure /landing/sublanding
*/
class SubLandingPage extends Page
{
/* ... */
}
class SubLandingPage_Controller extends Page_Controller
{
/* ... */
}
bash
# run dev/build to load extension
php ./framework/cli-script.php dev/build