Skip to content

bavarianbytes/kirby-link-field

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Link field for Kirby 3 (WIP)

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

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: mail@medienbaecker.com
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:mail@medienbaecker.com Phone number: tel:123456 Page link: https://www.example.com/products/lorem-ipsum

Installation

Put the link folder into your site/plugins folder.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 59.9%
  • JavaScript 31.0%
  • CSS 9.1%