-
01 Getting started building plugins for Vanilla
A plugin adds code to your Vanilla community. It can expose an API, fetch external data, or add a configurable widget. Themes and fragments give you more control over presentation. This guide takes you from a local installation to a custom catalog widget. Each chapter builds on a small example. You can also use the theme…
-
02 Set up Vanilla and create your first plugin
Use the Localhost Setup Quickstart as the setup reference. This chapter connects that environment to the plugin used in the rest of the guide. Prepare your environment The current quickstart lists Homebrew, PHP 8.3 or later, Docker, Node 20.x, Composer 2 and Yarn. You need access to vanillaforums/vanilla-local and your…
-
03 Create an API endpoint
An API controller gives your plugin a server endpoint that React code can call. Start with a fixed response. Then replace it with the external service in the next chapter. This chapter follows Writing API Endpoints and the inspected preview plugin's controller pattern. Define the catalog contract The tutorial uses this…
-
04 Call a third-party API
Keep the external request in a PHP service. Your endpoint and widget can then share one implementation. For a Widget Builder integration, follow the Data Source walkthrough. Vanilla already provides server-side secret headers and request proxying for that approach. Provision the credential The Code Deploy example reads…
-
05 Create a configurable widget
A Layout Editor widget has a PHP data contract and a React component. The PHP schema also describes the settings an administrator can edit. This chapter uses the CatalogService from Call a third-party API. Add the PHP widget Create Widgets/CatalogWidget.php in your addon. Use the namespace MyCustom\Catalog\Widgets and…
-
06 Create a file-based theme
A theme controls shared appearance and supplies assets such as a header, footer and theme variables. Keep your catalog's API and PHP service in the plugin. This chapter follows the Theming Quickstart, with asset names checked against the inspected source. Create the theme directory Create themes/my-custom-theme in the…
-
07 Create a plugin fragment
A fragment changes a supported widget's presentation while keeping its data flow. This example gives the existing Site Totals widget a new presentation. It reuses the widget's existing props. You do not need another API endpoint. Define the fragment metadata Create Widgets/Fragments/MyCustomTotalsFragmentMeta.php. <?php…