PHP code example of corex / site

1. Go to this page and download the library: Download corex/site 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/ */

    

corex / site example snippets


// Set/add a path where to load layout templates from.
Config::setLayoutPath($path);

// Set/add a path where to load view templates from.
Config::setViewPath($path);

// Set theme for layout. Default is 'bootstrap'. See Theme::* for constants.
Config::setTheme(Theme::UNITED);

Config::setTheme(Theme::SLATE);
$view = View::load('test')->variable('message', 'Some text');
$layout = Layout::load()->variables([
    'body' => $view
]);
print($layout);