Cognitives

Cognitives.io Documentation

Welcome to the Cognitives developer hub. You'll find comprehensive guides and documentation to help you start working with Cognitives as quickly as possible, as well as support if you get stuck. Let's jump right in!

Getting Started with Cognitives Template Development

This page will help you get started with Cognitives. You'll be up and running in a jiffy!

Basic Requirements

  • 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.

Steps

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.

Virtual Host Setup

  1. Click to know how to setup Virtual host on linux.

  2. Click to know how to setup Virtual host on wamp.

  3. Click to know how to setup Virtual host on mamp.

  4. Here is a sample code for creating a virtual host

<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>
  1. 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.
  2. 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.
  1. Restart Apache and test everything.

Getting Started with Cognitives Template Development

This page will help you get started with Cognitives. You'll be up and running in a jiffy!