kirby-link-field icon indicating copy to clipboard operation
kirby-link-field copied to clipboard

Discontinued. Please use https://github.com/OblikStudio/kirby-link-field.

Link field for Kirby 3

This is a link field for Kirby 3. You can conveniently insert external, file links, email addresses, page links or phone numbers.

Preview

Preview

Blueprint

fields:
  button:
    label:  Button
    type:   link

You can optionally define the possible link types (url, page, email, file, phone) and their order like that:

fields:
  button:
    label:  Button
    type:   link
    options:
      - page
      - url

By default, the url, page and email options are displayed.

Content file

An external URL:

Button: 

link: https://www.medienbaecker.com
type: url

A page link:

Button: 

link: products/lorem-ipsum
type: page

A file link:

Button: 

link: your-file.jpeg
type: file

An email address:

Button: 

link: [email protected]
type: email

A phone number:

Button: 

link: 123456
type: phone

Template example

There's a convenient ->toHref() method you can use to automatically return the correct href:

<?= $page->button()->toHref() ?>

Email address: mailto:[email protected] Phone number: tel:123456 Page link: https://www.example.com/products/lorem-ipsum

Installation

Put the link folder into your site/plugins folder.