Button Fieldtype

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

PropertyDescription
htmlMarkup 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

PropertyDescription
labelPage object if detected as internal page, default: NULL
 targetRelative paths will be translated to page (if exists). Placeholders (e.g. language home segments) can be used @see html  
 class CSS class

Generic properties

PropertyDescription
targetPagePage object if detected as internal page, default: NULL

Language specific properties

PropertyDescription
 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.

More modules by kixe

  • Color

    Field that stores colors. Many options for Input (HTML5 Inputfield Color, Textfield with changing background, various jQuery/JS ColorPickers, custom jQuery/JS/CSS) and Output (RGB, RGBA, HSL, HSLA…
  • Cronjob Database Backup

    Periodic automatic backup of the database. Set interval in settings.
  • Fieldtype Select External Option

    Fieldtype which generates the options for a Select Inputfield from any table of any (accessible) database. Define the source table, columns (to pull value & label) and the preferred…
  • 404 Logger

    Logs all requests resulting in http error 404
  • Setup Page Name

    Overwrites function setupPageName() in class Pages (core), which is typically called in case of autogeneration of pages. Provides more options for 'Name Format Children' in parent template…
  • Page Reference Context Data

    Field that stores one or more references to ProcessWire pages with additional data in field context, editable via page edit modal of the referenced page.
  • Cronjob Empty Trash

    Auto delete trashed pages sustainably after a predifined period of time set in module settings. This cronjob will run once per day.
  • Textformatter Page Images

    Allows you to insert images in a text area by referencing them with tags in the following format [[fieldName,Number,class]]. All Parameters are optional. Configurable base class and wrapper.
  • Button Fieldtype

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

All modules by kixe

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