Creating a new project¶
It all starts with the basics. In order to create a new project first head to the same folder iqcms-1.6 is located in. If you are running the docker development environment at https://gitlab.powerassist.nl/powerassist/dev-omgeving head to the www folder and checkout the skeleton project:
git clone git@gitlab.powerassist.nl:powerassist/iqproject.git -b v1.6 hello-world
This will create a complete new project from the v1.6 branch with just a few basic components.
Defining the database¶
Next thing is to create a hello-world/localhost.php file to tell the project which database collection it should use, which looks something like this:
<?php
define('DBASE_DATABASE', 'hello-world');
Once you created this file, open up hello-world/_settings.php in your IDE, locate the line define('DBASE_DATABASE','test');
and
completely remove it. Now open your browser and head to http://hello-world.v80.localhost.iqcms.site/ if
everything went to plan you should see Please run the installer first. This means everything is working as it should!
Note
Incase you get write permissions change the owner of the _tmp
and uploads
folder to the webserver or nuke it
by running chmod -R 777 _tmp uploads
.
Running the installer¶
Every project has its own installer which basically runs the installer in IQcms. You can run the installer by adding:
/install/install.php
to the URL in your browser. So for your project you should open up
http://hello-world.v80.localhost.iqcms.site/install/install.php in the browser, this will generate php code with a
few project specific encryption keys. This code you can copy paste in your _settings.php. Now you are good to go!
Hello World¶
Open up hello-world/components/main/main.tpl and add hello world
somewhere between the body tags. Navigate to
http://hello-world.v80.localhost.iqcms.site/ and evoila! Hello World!
Entering the CMS¶
Adding