eleohner13577
eleohner13577

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!

edwardfredparry27210
edwardfredparry27210

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!

edwardfredparry27210
edwardfredparry27210

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

yanto.lee40371
yanto.lee40371

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

ndcisiv
ndcisiv

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 %}`

laszlo.zenware.io
laszlo.zenware.io

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