Until the Video Tutorials are out, we urge you to browse the Code on Bitbucket (Branch 1.1).

User Manual

Code Organization

Amadeus is designed to have a single framework folder catering to multiple webapplications.

Each application contains
1) .htaccess - Configures URL rewriting
2) _cms.php - Sets application wide variables (theme,baseurl etc) , links to the framework's bootstrap.php and calls render
3) index.php / index.txt - Content of Home Page (to be rendered between header and footer of theme.
4) one php (OR) text file per page - URL rewriting automatically looks for a file matching the URL slug.
5) assets folder - contains scripts and css specific to the web application as well as images.
6) optional menu.tsv file - Include SEO description / Keywords.

Converting a Theme

Start with a HTML Template from the internet. Some good places to start:
* https://bootstrapmade.com/
* http://themeforest.com/

    ) Download the zip file to the "amadeus/themes/" folder / move it there

2) Extract the folder to themes so that the subfolder contains "index.html"

Rename the folder to add hyphens before new words and remove capitals.

For eg: BizLand should become biz-land (we prefer lowercase for urls so all folder/file names should follow that rule)

3) Save the index.html as header.php

Use a code editor like PSPad to edit the php, html, css, js files

4) Search for <title> and replace the line with:
<title><?php title(); ?></title>

5) Search for:
<meta content="" name="description">
<meta content="" name="keywords">
and replace with (a single)
<?php seo_tags(); ?>

6) search for
and replace with
"<?php echo $theme; ?>assets

7) Search for all the css/js files in the file. This is either in the head or just before body.
After it, add the line:
<?php styles_and_scripts(); ?>

8) Before the </head> tag ends, add the line


9) If supporting multiple folders (_imran, _healing etc), Replace the body tag
<body class="<?php echo 'fol' . cs_var('safeFolder'); ?> page-<?php echo cs_var('node'); ?>">

     ) LOGO / Link to home page line should look something like this:
<a href="<?php echo cs_var('url');?>"><img src="<?php echo cs_var('url'); ?>logo-<?php echo cs_var('safeName') . cs_var('safeFolder'); ?>.png" alt="<?php echo cs_var('name'); ?>" class="img-fluid"></a>

        ) Search for the Menu
In bootstrapmade.com, its usually within this tag
<nav class="nav-menu d-none d-lg-block">

Move it to menu.html and replace it with
<?php if (cs_var('node') == '_demo') include "menu.html"; else if (file_exists(cs_var('path') . '/_menu.php')) include_once cs_var('path') . '/_menu.php'; else menu(); ?>

    2) Detect begin of content of the page

This is usually where </header> ends

On bootstrapmade, this is the beginning of the hero section rest of content should go to home.php

    3) Detect Footer
This is usually where the </main> tag ends

Rest of file should go into footer.php

    4) Foter Content
this is usually a footer-top sort of div above which this line should be placed
<?php if (file_exists(cs_var('path') . '/_footer-content.php')) include_once cs_var('path') . '/_footer-content.php'; else { ?>
this will tell php to use the [optional] _footer-content.php from the website

    5) Copyright

© Copyright <strong><span><?php echo cs_var('name'); ?></span></strong>. <?php echo (cs_var('start_year') ? cs_var('start_year') . ' - ' : '') . date('Y'); ?> All Rights Reserved

    6) Add empty content.tsv file and refer to "make-theme-demoable"

Check demo by visiting: http://amadeus.panishq.com/demo/new/

    7) Add <br /><?php amadeus_credits(); ?> in the footer (usually below the theme credits