This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Hey everyone!
I'm looking for a list of all the types supported by the variable syntax fields in the Static Pages plugin.
The documentation only lists:
{variable name="tagline" label="Tagline" tab="Header" type="text"}{/variable} {variable name="banner" label="Banner" tab="Header" type="mediafinder" mode="image"}{/variable}
And while I've finagled others like colorpicker, there doesn't seem to be any complete resource on these.
Because these are client-facing options, a complete and compiled list of the supported types would be invaluable.
Thank you kindly!
Took me a while to work this out - sorry I'm 8 months late. From what I can tell, in the 'Rain Dynamic Syntax' - you get to currently use these types:
'text', 'textarea', 'richeditor', 'markdown', 'fileupload', 'mediafinder', 'dropdown', 'radio', 'checkbox', 'datepicker', 'repeater', 'variable'
Now I know this, I'm very happy. Being stuck with the mediafinder & text type was a pain. Can't tell if we were being stupid not seeing these types in the docs, or it's just not documented.
These types are pretty crucial for a client-friendly site!
I had some issues using the rich editor in the static pages plugin though, it wasn't coming out as html. Was outputting < p > tags on the website etc.
Declaring it:
{variable type="richeditor" name="richtext"}{/variable}
Using it:
{{ richtext }} (doesn't work)
{{ richtext | md }} (this works)
{{ richtext | raw }} (this works)
Someone please do say which filter I should use for any variable with the richeditor type? Currently using the Markdown filter.
Last updated
anybody can point out how to use the checkbox variable? The existing documentation on showing some sample on how to use text, mediafinder and dropdown. Thanks in advanced
Sure. In your template add something like:
{variable name='example_checkbox' span='right' label='An example texbox' tab='Page Settings' type='checkbox'}{/variable}
Then wherever you want to do something based off that checkbox add:
`{% if example_checkbox %}
The checkbox was checked!
{% endif %}`
Old post, but for anyone else who stumbles here: available dynamic variables are documented here: https://octobercms.com/docs/services/parser#syntax-supported-tags
1-6 of 6