Modules

The framework is so module based, that every page in the framework management is a module itself. Those modules can be found in the comps/modules/admin/* modules directories.

But the framework provide also a minimal set of modules that allow you to create minimal sites, like this one.

Those modules are:

auth

auth/in-or-out

auth/in-or-out is a module that verify if you are logged in or not. It gets two parameters placein and placeout, that are the places that it will create if you are logged in or not. The defaults are the actual $place where the module is being called concatenated with "_in" or "_out".

auth/needed

This module will show the login form if you are not logged in, and create a place other wise. It get a parameter named placein, that is the name of the new place. The default to that parameter is $place.'_in'.

css

This module gets the css from the database and print it. The CSS is also kept in cache for 10 minutes.

files

files/download

This module can be used to download files that you need to package with your application. In the default configuration it already do that. Urls in the form /appfiles/aplicationname/(.*) will be looked for insite the appfiles of the aplicationname aplication.

main

This module use the url to replace itself with a place that have the name with the first part of the url. For example, if the url is /view/test.html, it will replace his place with a place name view (or after it, as you will see).

This modules can get as parameter:
  • baseuri - the base uri, after which the new place will be get. The default for this parameter is '/'.
  • ismain - If this parameter is true, the module will set mainbaseuri and mainplaceholder in the $mf->data().
  • class - the class that will be given to the module template. The default to this parameter is 'main'.
  • template - the name of the template that main will use. The default to this parameter is 'maincontent'.


menu

menu/create/plain

This menu create the menu struct of a plain menu, with all options at the same level, ordered.

menu/display/list/

This module create a html structure using the menu struct it gets from menu/create/plain or other similar. It uses ul and li to create the menu.

pages

pages/view

This module can be used to show pages. It can get as parameter pageid, the pageid of the page to show, template is the name of the template to use to show the page ('page' is the default), template404 if the module is used to handle the 404 placeholder, and this parameter will be used as the real 404 template.