PHP code example of dd / evolutioncms-snippets-ddif

1. Go to this page and download the library: Download dd/evolutioncms-snippets-ddif 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/ */

    

dd / evolutioncms-snippets-ddif example snippets


//Include (MODX)EvolutionCMS.libraries.ddInstaller
nstaller/::install([
	'url' => 'https://github.com/DivanDesign/EvolutionCMS.snippets.ddIf',
	'type' => 'snippet'
]);

//Include (MODX)EvolutionCMS.libraries.ddTools
/ddTools/modx.ddtools.class.php'
);

//Run (MODX)EvolutionCMS.snippets.ddIf
\DDTools\Snippet::runSnippet([
	'name' => 'ddIf',
	'params' => [
		'operand1' => '1',
		'operator' => 'bool',
		'trueChunk' => '@CODE:It's true!'
	]
]);
html
<div class="inexpensive">
	<h2>Some inexpensive good, <strong>$120</strong></h2>
	<img src="assets/images/goods/some1.jpg" alt="Some inexpensive good" />
</div>