Loading...
 
Skip to main content

History: PluginButton

Source of version: 17

Copy to clipboard
            ! Plugin Button
Use this ((wiki plugin)), introduced in ((Tiki6|Tiki6.1)), to show links as buttons, while allowing ((Wiki Argument Variables)) (e.g. -+~np~{{itemId}}~/np~+- ) to be used without the need of an admin to re-validate the plugin call each time (as it has to be done if you use for such task the generic PluginSmarty, each time a new itemId is passed in the url to the wiki page containing the plugin).

This is specially useful in cases of custom workflows using  trackers and wiki pages with tracker plugins to insert data, edit it afterwards, etc., and showing those links as buttons.

Since Tiki19 it is possible to display only an icon without label (text). See example below.

!! Parameters
{pluginmanager plugin="button"}
!! Example
!!! Use a url parameter, icon and danger type
''This code:''
{CODE(colors="tiki")}
{button href="Home?itemId={{itemId}}" _text="Go there" _type="danger" _icon_name="wrench"}
{CODE}
''Would produce on this site:''
A button with the "Go there" as label, and the wiki argument variable ~np~{{itemId}}~/np~ replaced by the itemId passed in the url of the page where this plugin button is located:

{button href="Home?itemId={{itemId}}" _text="Go there" _type="danger" _icon_name="wrench"}

!!! Link to a pop-up
''This code:''
{CODE(colors="tiki")}
{button href="HomePage" _rel="box" _text="Go there"}
{CODE}
''Will create a button that opens the HomePage in a colorbox'':

{button href="HomePage" _rel="box" _text="Go there"}

!!! Button bar without text
''Since Tiki 19, this code:''
{CODE(colors="tiki")}
{button href="HomePage" _icon_name="home" _type="primary"}
{button href="Edit" _icon_name="pencil" _type="primary"}
{button href="Delete" _icon_name="trash" _type="danger"}
{CODE}
''Will create a set of buttons with icons only'':
{button href="HomePage" _icon_name="home" _type="info"}{button href="Edit" _icon_name="pencil" _type="primary"}{button href="Delete" _icon_name="trash" _type="danger"}

!!! Button that opens the href URL content in a modal with custom redirect once submitted
''Since Tiki 20.2, this code:''
{CODE(colors="tiki")}
{button href="HomePage" _class="click-modal" data="modal-submit-redirect-url=/success-page"}
{CODE}
''Will load the href URL in a modal, and redirect to the URL given in the data attribute once the form (if any) within the modal is submitted.''

!! Related pages
* ((PluginSmarty))
* ((PrettyTrackers))
        

History

Advanced
Information Version
Bernard Sfez / Tiki Specialist 20
Bernard Sfez / Tiki Specialist Added missing documentation about the none type for a button style. 19
luciash d' being 🧙 test if wiki syntax for wiki page links works 18
G. fix type 17
G. add button with modal and custom redirect 16
Yves Kipondo 15
Bernard Sfez / Tiki Specialist Adding doc and sample for button usage without label since Tiki19 14
lindon 13
lindon 12
lindon 11
lindon 10
lindon 9
Torsten Fabricius added the colorbox tip 8
Torsten Fabricius Plugin Manager Plugin modified by editor. 7
Carsten Aevermann 6
Carsten Aevermann 5
Carsten Aevermann 4
Xavier de Pedro 2
Xavier de Pedro 1