- PHP 5.4.0 or higher is required.
- Apache 2.2.17 or higher is required.
- MySql 5.5.8 or higher is required.
- Composer must be installed in your system. Please refer to the guide on how to install composer from https://getcomposer.org/.
Follow these guidelines to create a brand new theme of your choice for cognitives.
Step 1: Clone the Cognitive theme development package inside your preferred directory.
Step 2: Create a virtual host to run the theming platform on local system..
Step 3 : Open CMD and navigate to theming-platform directory. Run composer global require "fxp/composer-asset-plugin:^1.2.0"
Step 4: Now run the composer update command to get the dependencies.
Step 5: Copy any theme from https://github.com/CognitivesPlatformIO and paste it under web/themes. System already has web/themes/theme as the default theme shipped to test and build with. You can either duplicate the web/themes/theme folder to web/themes/mytheme and then start customizing.
Step 6 : Create a file "params-local.php" inside "theming-platform/config" folder with following code.
Step 7 : Get sample data for your template development process.
Step 8 : Learn how to create theme for your network.
<?php return [ 'themeDir' => 'mytheme', //this line is only needing if using a different theme folder othan than web/themes/theme ];
Step 7 : Now open browser and hit "themedev.cognitives.io". If all is good, theming platform will be up and running.
<VirtualHost *:80> ServerName themedev.cognitives.io DocumentRoot "Path-to-web-folder-inside-theming-platform" SetEnv APPLICATION_ENV "DEV" <Directory "Path-to-web-folder-inside-theming-platform"> DirectoryIndex index.php AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost>
- Next head over to your host file to edit your HOSTS. the file will be located at C:/Windows/System32/drivers/etc/hosts, where hosts is the file. Open it with notepad.
- Look for
# localhost name resolution is handled within DNS itself. # 127.0.0.1 localhost
and add the following just after that line:
# localhost name resolution is handled within DNS itself. 127.0.0.1 localhost 127.0.0.1 themedev.cognitives.io #change to match your Virtual Host.
- Restart Apache and test everything.