PHP code example of pickles2 / px2-multitheme

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

    

pickles2 / px2-multitheme example snippets


$conf->funcs->processor->html = [
	// テーマ
	'theme'=>'tomk79\pickles2\multitheme\theme::exec' ,
];

$conf->funcs->processor->html = [
	// テーマ
	'theme'=>'tomk79\pickles2\multitheme\theme::exec('.json_encode([
		'param_theme_switch'=>'THEME',
		'cookie_theme_switch'=>'THEME',
		'param_layout_switch'=>'LAYOUT',
		'path_theme_collection'=>'./px-files/themes/',
		'attr_bowl_name_by'=>'data-contents-area',
		'default_theme_id'=>'pickles2',
		'options'=>array(
			'pickles2'=>array( // テーマ pickles2 に対するオプション
				'sample_param'=>'hoge' // テーマ側からは、 `$theme->get_option('sample_param')` で受け取ることができます。
			)
		)
	]).')'
];


<p>'theme_files/hoge/fuga.png' を呼び出す</p>
<img src="<?= htmlspecialchars( $theme->files('/hoge/fuga.png') ); 

$ php ./vendor/phpunit/phpunit/phpunit