Skip to main content

Application hooks

Hooks allows you to integrate dynamic content from the deck into the application.

Hooks allow you to perform such features as:

Types of hooks

info

ES6 and lodash.js are available for use in all types of hooks.

Fieldsets

Fieldsets is a hook designed to add customization and extra data to presentations. It has many possible uses, but the most usual ones are adding contextual data to your presentation (eg. customer/contact names) and other context based on user inputs (general html inputs, file/image uploads, etc).

Selections

Selections give developers the ability to change the sequence and visibility of sections and slides as well as dynamically generate subslides. Selections are run after an appointment has been saved (whether creating or editing). These operations are automatic and unseen by the user, and are often based on a fieldset input, or data fetched for that specific appointment. For a hypothetical example where you have added a 'career' dropdown, selecting "Dentistry" instead of "Carpentry" as a fieldset could automatically make all the Carpentry slides invisible by default.

SelectionRules

Selection rules are very similar to selections, (and has a very similar api) but instead of dealing with modifications at appointment save, are instead applied on change when sorting slides in a presentation - whether changing visibility or sequence. These changes are immediately visible when the user attempts to modify slides that affect a rule.

You can use it to enforce the same rules as selections, or any other arbitrary set of rules. Optional messaging can be returned to explain why changes are made.

Markers

Markers allow slides to be marked as needing review. The markers hook runs after each context change and when an appointment is created or saved. If a slide has been marked for review the user will not be able to start the presentation until they have viewed that slide either in Prep mode or in the slide sorter preview.