Skip to content
This repository has been archived by the owner on May 25, 2023. It is now read-only.

medienbaecker/kirby-link-field

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚠️ This is now a core feature of Kirby 4: https://getkirby.com/releases/4.0/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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •