Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 24 lines (15 sloc) 0.585 kB
34f54cc @kaos Added documentation stubs.
kaos authored
1
b11a84e @kaos doc: rearranged ref docs to include the meta doc.
kaos authored
2 .. include:: meta-script.rst
3
4
eb74555 @kaos doc: migrated the remaining action documentation.
kaos authored
5 This action executes Javascript directly. It can be used to interface with non-Zotonic Javascript libraries and functions.
34f54cc @kaos Added documentation stubs.
kaos authored
6
eb74555 @kaos doc: migrated the remaining action documentation.
kaos authored
7 Example::
8
c6f5cd2 @ArthurClemens doc: fix 'button title' to 'button text'
ArthurClemens authored
9 {% button text="hello" action={script script="alert('hello world')"} %}
eb74555 @kaos doc: migrated the remaining action documentation.
kaos authored
10
11 Clicking on the button will show a Javascript alert with the text `hello world` in it.
c6f5cd2 @ArthurClemens doc: fix 'button title' to 'button text'
ArthurClemens authored
12
13 Using template variables::
14
15 {% with "world" as recipient %}
16 {% button
17 text="hello"
18 action={
19 script
20 script="alert('hello " ++ recipient ++ "')"
21 }
22 %}
23 {% endwith %}
Something went wrong with that request. Please try again.