Skip to content

Addon Dev – 1st Steps

gtbu edited this page Sep 19, 2021 · 5 revisions

What you need to know from the start

Typesetter plugins can be installed in two ways: via remote or manual installation. Most users will normally choose the remote method, which automatically fetches all required files directly from typesettercms.com and install them in a (randomly named) subdirectory of ‌/‌‌‌‌‌‌data/‌‌‌‌‌‌_addoncode. This, of course, only works with plugins already published on typesettercms.com

All plugins available for remote installation can also be downloaded as ZIP archive from typesettercms.com/Plugins. For manual installation, the folder from the downloaded ZIP and its content must be extracted into the /addons directory of your typesetter installation. The 'Example' and 'Multi Site' folders already exist there but the plugins are not installed by default.

For plugin development we choose the manual installation, which is also called 'developer' installation.

The main difference between both installation types is that Typesetter not only creates the required files and directories during remote installation, but it will also delete them when the plugin is uninstalled. In addition, plugin files are replaced during a remote update.

Neither of these happens with manually installed plugins in the /addons directory. Therefore your work is protected from accidental clicks (FYI: The same applies to themes in the /themes directory).

When we start creating a new plugin we will usually make a copy an existing one and modify/build on it. Building upon a copy of a similar plugin will save you a lot of time at the beginning.

But for our debut we're starting from scratch:

Create a plugin directory

To get started, we first need to create a new plugin directory – e.g. /‌addons/‌MyFirstPlugin.

Proceed to Addon Dev – Addon.ini