PHP code example of yawik / landingpages

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

    

yawik / landingpages example snippets


<?=$this->landingpage()


// get the landingpage params
$params = $this->landingpage()->getParams();

// render a combination of this landingpage with a category
if ($this->landingpage()):
    if ($this->landingpage()->getCategory()->getName() == 'top'):
        echo $this->landingpages(
            [
                $this->landingpage()->getSlug(),
                'bottom',
                'glue' => 'and'
            ]
        );
    elseif ($this->landingpage()->getCategory()->getName() == 'bottom'):
        // ...
    endif;
endif;  
 php
$route = '/landingpage/%slug%';
 php
$landingpages = [];
 php
<?=$this->landingpages(string|array $slug, string $partial, array $values)