Using variables
- To edit your post's variables, open the "Edit variables" panel as marked below in yellow:
- This panel will list any variables you've set up. If you set site-wide variables (in your Site Settings accessible from the Dashboard), they will be listed as well.
Note: Variables are inherited by children posts! To prevent this, click the button next to the variable field.
-
In the example above, we've set the variable "variableTest" and a placeholder value. This variable will now be available for usage in your content like so:
%vars.variableTest%
As you can probably guess, "%vars%" is an object containing the variables you've set up.
There are other PRSS-defined variables that you can use. This is a more advanced topic which we'll explore later in the "Themes" page.
Why would I need variables?
Variables are mainly used to pass information ("Extra fields") to your themes. Let's edit the Home page's variables for an example:
As seen here, variables are used to customize the "hero" section of the homepage, while the post contents are used below that.
Every theme has variables that you can set in order to customize it. To learn more about what variables your theme supports, check out your theme's docs in the "Themes" page.