PHP code example of lorenzosanzari / mozaiku

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

    

lorenzosanzari / mozaiku example snippets


 $this->section('menu'); 

 $this->section('title'); 

<!-- theme.php -->
<!DOCTYPE html>
<html>
    <head>
        <title>Mozaiku example theme</title>
    </head>
    <body>
             $this->section('title'); 

<!DOCTYPE html>
<html>
    <head>
        <title>Mozaiku example theme</title>
    </head>
    <body>
            Theme title content
                       
            <div id='article'>
                This is a modified article body overridden by page.php.
            </div>
      </body>
</html>

 $this->showsection('my_section'); 

 $this->

$mozaiku = new Mozaiku();
$data = [
	//view data array...
];
$output = $mozaiku->render('page.php', $data, $return);

<!-- Stack use example -->
 $this->push('head'); 

 $this->stack('head'); 

$mozaiku = new Mozaiku();
$mozaiku->debug = true; //debug mode

$mozaiku->strict_mode = true; //strict mode