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

Link to page in writer field#268

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

a year ago
4

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 http://example.com/some/page, not the dynamic link like (link: some/page). Do you think this is a problem?

a year ago
D

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.

2 months ago
1

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.

a month ago