This site uses cookies in order for our service to work better. Learn more I understand

Plugin structure

Windu CMS consists of independent plugins which are connected by the fact that they are all called out from the so called core system.
A plugin is an independent program that has its own controller, models and configs.

Structure of the plugin:
  • addons - here we can add any php files which execute operations for us, this folder is a core of our plugin. It's important to correctly name our file and class inside of it, so the autoloader can understand the syntax. Name of the class is an "image" for example and the name of the file in this case should be "image.class.php" and its like this in whole system.
  • config - here we have 4 files with predefined names which are:
    • config.php - file that contains additional constants, which will be attached to config by the system
    • css.ini - file with tabels of css files which are added to resources of the loader, system will include them in a correct place in "view".
    • js.ini - like css.ini but its javascript files
    • router.ini - file with structure of paths, defines which path has to call out to what
  • controller - all the controllers which are indicated by router
  • model - if plugin has its own tables then file answering to given table should be in the same folder.Remember about correct name of the file, if table is named "images" then model should be named "imagesDB.class.php"
  • resources -here we have an ability to insert all the aditional resources like images, fonts or css/js files

Help Center

Do you have a technical problem?