Relative Link inside the Website


#1

Hello,

i have a simple problem and already looked in the forum, how to set a link
to page with a different level, for example i have some links in the footer:

when a link to level1/level2 is set, i always get an error after clicking on another
page, which is not on the same level.

Any help?


#2

What is your Kirby version?

So you are not using the url() method but the URI to link to your pages? What do your links look like then in your navigation?


#3

i have this version: Kirby version: 2.5.12

And just using the folder names to link: competences/blockchain-strategy


#4

Any reason why you don’t use the URL?


#5

sure…i can use absolute paths, but thought i need to set up something to use relative paths


#6

Unless you have a very good reason to use relative paths, it is usually recommended to use absolute URLs.

Have you tried with a slash before your paths?

/projects

etc?


#7

not tried a slash, now using absolute paths. What does it do?


#8

Well, without the slash, the path will be resolved in the current folder, resulting in wrong links.