FieldtypeButton by kixe

Field that stores 3 values for label, target and class (CSS). Output markup configurable in field settings.


ProcessWire Module Fieldtype to easily create and edit buttons for the frontend.

The returned value is an instance of Button. Direct output provided.

Button properties

With the button object the following properties are provided:

Defined in field settings

|:-|:-| | html | Markup for the output. Placeholders can be used. Define placeholders by surrounding property names with curled brackets. If a property is an object use dot syntax to get subproperties. |

Defined in inputfield

|:-|:-| | label | Page object if detected as internal page, default: NULL | | target | Relative paths will be translated to page (if exists). Placeholders (e.g. language home segments) can be used @see html  | | class | CSS class |

Generic properties

|:-|:-| | targetPage | Page object if detected as internal page, default: NULL |

Language specific properties

|:-|:-| | language | Language object (current user language) | | lang | Language home segment | | langNonDefault | Language home segment appended by a slash or empty string if default language | | langFor<homeSegment> | E.g. langForEn. Language home segment appended by a slash. Provided only if user language matches, otherwise an empty string will be returned | |label<languageID> | E.g. label1234. Language specific button label. |

Install and use modules at your own risk. Always have a site and database backup before installing new modules.

Twitter updates

  • Stumbling upon a really nice ProcessWire-powered website, plus core updates including API improvements for ProcessWire forms— More
    9 September 2022
  • Useful new dot-and-bracket syntax options added for page.get() method— More
    2 September 2022
  • This week, in addition to the regular core updates, we have new versions of ProcessWire ProFields Table and ProFields Combo that add support for their own file and image types— More
    19 August 2022

Latest news

  • ProcessWire Weekly #437
    In the 437th issue of ProcessWire Weekly we're going to check out the latest core updates, forum highlights and online resources, and more. Read on! / 24 September 2022
  • Multi-language field translation export/import
    In this post we cover the details of a new module that enables export and import capabilities for multi-language fields in ProcessWire.
    Blog / 5 August 2022
  • Subscribe to weekly ProcessWire news

“Yesterday I sent the client a short documentation for their ProcessWire-powered website. Today all features already used with no questions. #cmsdoneright—Marc Hinse, Web designer/developer