+1 571-297-6383 | info@sonjara.com

Chapter 6: Actions

In the previous chapter on Components, we explained how Fakoli lets you can scan for component updates that bring your new components or component pages into the CMS. This scan is an example of an action. Actions are initiated by users and require a code file to provide the response. Submitting a form is a user-initiated action but this response would typically be handled within the same code file that presents the form. An action requires the page to seek out help from another file, execute some steps, and then return. Action files are stored in the handlers folder of the component.

On the component list page, the button "Scan for Component Updates" calls the file "scan.inc" using the command "/action/component/scan". In the preceding call, the word "action" is a reserved word that tells Fakoli that the file to be executed is an action file called "scan.inc" that is stored in the handler folder of the component called "component".


Chapter 7: Events » « Chapter 5: Components