Content Block
Last updated
Last updated
With your application and endpoints ready you're pretty much set on the backend. While you can technically call the backend from any webpage by importing the HTMX library yourself, we highly recommend using the provided Lava Application Content block on the front-end. This block automatically registers HTMX for your and provides convenience features and styling.
Below are the block settings for the Lava Application Content Block:
The configuration of the block includes:
Name - The block name. We recommend setting this to a well considered name as it will help with editing inside of Magnus.
Application - While optional it's wise to set the application that you will be targeting. Doing so will share the application's configuration rigging object to your Lava template using the ConfigurationRigging
merge field.
Lava Template - The Lava to show on the load of the block.
When you access endpoints from the Lava template you'll want to use the notation of:
The ^
character indicates that the route is associated with a Lava application. While you can access the endpoint using the full API route, using the caret simplifies the process.