Sorry, we don't support your browser.  Install a modern browser

Link to page/file in writer field (picker UI)#268

The possibility for internal links (= link to another page) would be nice for the writer field.

2 years ago

I’m thinking about it. Since the writer field does not work like markdown, when we add the link of the page, it will save the absolute link that includes full url as HTML like, not the dynamic link like (link: some/page). Do you think this is a problem?

a year ago

Either way would be an issue, imagine if your page change slug, the link will then be broken. That’s why it’s necessary to have immutable id’s for internal linking.

a year ago

Since we do not have an immutable id at the moment, also problems may occur in the links we give with the link() tag in markdown. The point I want to draw attention to here is the domain address. When we first make the site on localhost and then move it to the prod domain, links with localhost will not work. Is this an acceptable case?

a year ago

At the moment this is our workaround: We add a base url and use the page slug of the target page in the link input.

a year ago

I don’t think the domain should be stored

a year ago

Do you think the links should be stored like this?

<a href="/some/page">Link to page</a>

<a href="/subfolder-kirby-installation/some/page">Link to page</a>
a year ago

It would be best if there was a special mark for such an internal link so that the correct link tag can then be constructed in the backend when the field is rendered. However I don’t have a good overview over the writer field at the moment to tell if it’s possible and how this would be done.

a year ago

I don’t think we can convert the special mark without using an additional tag/method.

a year ago

I’ve seen other CMS’s using a custom protocol scheme for marking internal links, e.g.: page://some/page or kirby://some/file.pdf, which seems to work quite fine. One caveat: The field content woudl hav to be parsed before being useful.

Another possibility could be the usage of custom attributes, e.g. <a href="/some/page" kirby-link="i324-ohui45h3u…">. The latter approach would probably work much better once Kirby supports persistent IDs, because it remains transparent what the link should point to, while still allowing Kirby to generate an absolute URL at runtime based on current domain, language etc.

5 months ago

I really hope that this gets some attention soon after Immutable IDs have been implemented.

As not having an easy way for a CMS user to insert a simple text link to an internal page, (without having to first lookup then type/paste the slug) is the main area that I feel Kirby is behind in compared to other CMSs which often provide a dropdown of internal pages to pick from.

4 months ago

Here’s a quick mockup of how this could look.

(I took the Link dialog from the Markdown field plugin, and added a Page option with a dropdown to select the page).

2 months ago
Merged Link to file in writer field#215
a month ago
Changed the title from "Link to page in writer field" to "Link to page/file in writer field (picker UI)"
a month ago

Now that we have permalinks I really hope we can get this into the core because as others have mentioned it is a bit of a pain in the ass to manually copy/paste page links, especially for clients.

15 days ago