kirby-link-field
kirby-link-field copied to clipboard
[K4] 4.0 Compatibility
UI broken for K4
Kirby 4.0.0-rc.4 PHP 8.1.23
I think the correct course here is to just deprecate the plugin. As of Kirby 4.0, it has its own link field, so it doesn't make sense to use a plugin.
I've used this plugin in quite a few projects over the years (many thanks!). While Kirby 4 has a much more flexible Link field than ye olde Url field it does not replace this plugin. Most notably, Kirby's built-in Link field is missing the extra text and popup options. It would of course be possible to supply those via additional fields but upgrading more complex v3 projects to v4 would be a major pain... Or am I missing something?
same here, we need the text field for custom labels.
@afbora how did you even get it to install? I am in composer dependency hell right now, because the latest version 5.2.2 is only compatible with kirby 3.8 an higher but lower that 4. the last "compatible" version is 2.0.2 which is old and broken.
@owzim I installed manually (download zip file), not via composer.
@foxacid same here. the core link field is a major let down compared to this one.
- no search
- looks totally different than other reference fields like files and pages
- behave differently
- misses things like label and popup
- the value stored in the page file is only the value, no type like
emailorpage, you would have to parse and in some cases guess, what type of value is stored
Unfortunately I cannot mention @OblikStudio but we @bytepark would like to fork this project and continue support and development.
@owzim that sounds great. the plugin developer is @hdodov so your best bet is to reach out to him.
@hdodov I suggest you keep up-to-date the plugin for v3 and next kirby releases. I can say that extra features such as target, link text will not come to the core link field in the near future.
We recommend extending the core link field using object field: https://getkirby.com/docs/reference/panel/fields/link#adding-target-link-text-etc
@afbora @foxacid
I reviewed object field again, having it dismissed before because the preview for the link field sucks, but the pages, files and url field, selectively hidden based on selected types, it's very usable and quite pretty:
link:
type: object
fields:
type:
type: select
label: Type
options:
page: Page
image: Image
url: URL
page:
type: pages
max: 1
when:
type: page
image:
type: files
max: 1
when:
type: image
url:
type: url
when:
type: url
text:
type: text
label: Text
newtab:
type: toggle
label: Open in new tab
drawer:
@owzim the preview of the link field will be fixe din Kirby 4.1 (release pending):
@distantnative so Kirby will support adequate link fields natively and I could deprecate the plugin?
@hdodov depends on what you consider adequate, I guess. Link field as it is in 4.0, betting a structure field preview in 4.1
I don't think there's a point in expanding this plugin for Kirby 4. As stated in the Kirby 4 release page about its link field:
Link to external URLs, internal pages, files, email addresses, telephone numbers, anchors or custom links.
fields: link: type: link
This is exactly what this plugin is trying to accomplish. Therefore, if you want extra functionality (or better one), you should push for it in the main Kirby link field. It's going to be better for everyone and make Kirby better in the process.
If someone really badly needs this plugin in Kirby 4, feel free to submit PRs.
Actually, nevermind. I decided to check out how hard it'll be to fix and it turned out to be easy. I published version 6.0.0 with support for Kirby 4. Check it out and let me know if it works alright.
@distantnative big props to the entire Kirby team for keeping things consistent between Kirby 3 and 4. 🙌
P.S. I still think it's better if people move away from this plugin and use the native Kirby link field.
@hdodov , thanks for keeping plugin up-to-date. I tried v6 and it unfortunately breaks links functionality from within the Writer field. Should I create a new issue?
@skraby how does it break the links functionality? In what way? You could submit a new issue, yes, and include all the details I'm asking for there.