ShowPage
Packs – shortcuts to working applications

A pack is a collection of tables, views and plugins that give you a complete working application that can be installed with a single click. Installing a pack saves you from doing work that you would normally do using the Saltcorn user interface, but it cannot enable functionality that you could not do otherwise using the user interface. For that, you need to activate a plug-in. However, if some of your views or datatypes in your tables require a specific plug-in to work, that plug-in activation can be part of the pack.

Activating packs

To activate a pack, first you should be logged in as a user with administrative privileges. Then go to the Plugins option under the Settings menu. One of the windows, the lower on the right shows the packs that are available from the store. To install one of them, simply click the install button. The necessary tables and views will then be created, and the required plug-ins will be activated.

From this point, you are free to change the tables and views that have been defined. For instance, you could go to one of the tables and add another field. The views of that table will not automatically track the new fields and you will have to add the new fields to the views of that table as well.

Installing a pack from a JSON file

If you have a JSON file representing a pack (the next section will show you how to generate one) you can also install that. In the Plugins menu option (under Settings), in the Available packs window, near the bottom there is a link to "install another pack." Click this link and paste in the contents of the JSON file describing the pack. This will normally start with the character {. Note that you should paste in the contents of the JSON file and not the filename.

Creating a new pack

If you have created a system of tables and views using the Saltcorn user interface, you can turn it into a pack. In the Plugins menu, in the Available packs window, near the bottom there is a link to "Create pack." Click this link, and you will see a series of checkboxes for each of the items (tables, views and plug-ins) that will be part of the pack. Items that you want to be included in your pack, and click Save. You will then see the JSON contents that define the pack. You can copy this into a file or send it to someone so they can install it as their own application.