PageFactory (Kirby Plugin)

Button()

button()

Renders a button.

Example

js:
function myCallback() {mylog('button clicked');}
----
{{ button(
    label: My Button
    callback: myCallback
) }}

Arguments

label
Text on the button.
text
Synonyme for "label".
id
ID to apply to button
class
Class to apply to button (class "pfy-button" is always applied).
callback
Optional callback function (either name or closure)
title
(optional) Text to be placed in title="" attribute of button.
attrib
HTML attribute, e.g. "data-x='y'"

Example

{{ button(
    label: 'My Button'
    callback: 'function() { alert("My Button pressed") }'
    )
}}

PageFactory