PHP code example of se7enxweb / explayouts
1. Go to this page and download the library: Download se7enxweb/explayouts 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/ */
se7enxweb / explayouts example snippets
$layout = expLayoutsResolver::resolve(); // current request URI
$layout = expLayoutsResolver::resolve( 'about-us/team' ); // explicit path
if ( $layout instanceof expLayoutsLayout )
{
$prepared = expLayoutsRenderer::prepareLayout( $layout, 2 ); // 2 = published
}