The following is a short summary of the basic process through which the contents of a page with iWiccle/Wiccle come together. There's a full system flowchart coming up to illustrate all of this in more detail, these are but quick notes to point you in the right direction if you want to dig deeper under the hood.
1. Page layout ABC. Every URL has a $_GET['show'] parameter, which links to a layout and a set of columns and boxes in the database (w_layouts, w_columns, w_units).
If you look at the w_units table in the database, you will find a) custom content (user-input HTML), or b) dynamic content (anything off the database) with specifications on the scope and format of the data, along with c) definition of the units' frames (or "boxes"). These settings for dynamic content are done with the builder.
2. Layout parsing. Template::get_layout() loops over the "wireframe" of the page, and fills it with the requested kinds of content by calling to other classes and functions as defined over call_unit() and from there onwards.
3. Dynamic content. For handling most kinds of dynamic content, we currently use Module::get_elements() and Queries::get_elements(). The class Queries function composes the MySQL query for fetching the requested data, and the Module class function processes it into templates. The data is returned from here to templating.
4. Main templating. Module input (which is all of above) is parsed into the main wrappers, and menus etc. are generated, from under templates/[folder]/wrapper.php, a file that should be quite self-explanatory in terms of what it does, and processes everything into place to the main wrappers under skin_wrappers.php. (These files are where you can control the general layout of a skin.)










