PHP code example of melisplatform / melis-demo-cms
1. Go to this page and download the library: Download melisplatform/melis-demo-cms 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/ */
melisplatform / melis-demo-cms example snippets
<VirtualHost *:80>
DocumentRoot "PATH_DOCROOT/public"
<Directory "PATH_DOCROOT/public">
Options +Indexes +FollowSymLinks +ExecCGI
DirectoryIndex index.php
Order allow,deny
Allow from all
AllowOverride All
Require all granted
</Directory>
ServerName www.mysite.local:80
SetEnv MELIS_PLATFORM "development"
SetEnv MELIS_MODULE "MelisDemoCms"
</VirtualHost>
$siteConfigSvc = $this->getServiceManager()->get('MelisSiteConfigService');
$config = $siteConfigSvc->getSiteConfigByKey('key', 1,'sites', 'fr');
// The language of the page is now overridden by the specified language.