Skip to content

Modules and builders

Thorazine edited this page Jun 7, 2017 · 2 revisions

The base of Hack consists of two types of items. We define them as "Modules" and "Builders".

Modules

A module is what you probably imagine it would be. It is a few scripts of code that add functionality to hack and are added to the menu for additional entry of data. For instance, Hack currently does not have a FAQ function included. So to be able to properly add FAQ's you might want to write a custom module. This module would have a question and answer section for your client to fill in and would be put in the sidebar menu. It has its own table, its own rights and is a standalone in the system. To access it's data a query should be ran just like any other module you would ever build in any other project.

Builders

This is where the "magic" happens. A builder connects a module to a page template. It basically does nothing more than add a relation to a template (and thus a page) so it is loaded whenever your client wants to edit a page. The entry point for adding data remains the same for the module, but by adding a builder you can select a subset of your module to be included in your page data.

Clone this wiki locally