Basic principles DIAFAN.CMS

  • DIAFAN.CMS designed to facilitate the development of the site, not to complicate it. So if you need to make some sort of action or revision on the site, most likely it is possible to make a couple of teams from the API, what kernel alteration.
  • If any changes made to the script disable caching and enable developer mode.
  • All files stored in DIAFAN.CMS format UTF-8 without BOM. Built-in Windows "Notebook" does not work with this format! It is strongly recommended to edit any file using a free editor of Notepad++, which clearly and undoubtedly more convenient.
  • Basis in DIAFAN.CMS – site pages and menus. This is the basic skeleton of the site, consisting of the page tree. Public addresses of pages are formed on their basis. Properties pages – a title headers, texts, etc. are mounted on the site modules.
  • The module itself is in the user part of the site can not exist. To module earned on the site, it must be attached to any page of the site.

Example:

Create a page "New", which has its title, keywords, description and address of http://site.com/new/, and only then on this page you can "hang" module, for example, "News". The module is located on the page http://site.com/new/ and creates depth has your pages with their addresses, for example, http://site.com/new/first-news/ and http://site.com/new/second-news/ and http://site.com/new/page2/ etc.

  • Overall design (design) of the site is in the file themes/site.php (or other in the folder themes). File pattern design by default – site.php. If you want to fix a cap on the ite or the height of the basement, you need to go to the file themes/site.php (except custom order, see below).
  • Modules templates is located in the module folder of the file modules/module_name/views/module_name.view.template_name.php. If you want to tweak the product card, for example, move the "Buy" button, you have to go to the file modules/shop/views/shop.view.id.php (except custom order, see below).
  • Remember the template scheme, and custom themes site.