Hi,
I’m evaluating Kirby for my company homepage. I created a folder structure for my products, similar like this:
content/1-products/1-categoryA/1-seriesA/1-product1
content/1-products/1-categoryA/1-seriesA/2-product2
content/1-products/1-categoryA/1-seriesA/3-product3
…
Normally I put all related documents, datasheets, manuals etc. into the respective product folder.
It is now so that some products share the same datasheet, which I would like to place only once into the “1-seriesA” folder. Also I created a nice little table where I offer my downloads combined with a PDF icon.
Now, to access the shared files, I tried (image: …/pdficon.gif) to link to the parent folder, which works fine.
However, (file: …/mydatasheet.pdf) does not work any. Seems id does not understand the …/ path.
Ok, I did some more tests. It seems like the (file:) tag supports neither the absolute path nor the relative path. It only supports files in the very same directory.
While the (image: ) tag supports both of them.
An absolute path could be /content/1-products/1-categoryA/1-seriesA/file.pdf
A relative path could be …/file.pdf
Thank you texnixe,
I see I have to omit the folder numbering. I get something to work from the product1 folder like:
products/categoryA/seriesA/file.pdf
(without /content and without numbers)
I wish the (file: ) tag would accept relative paths in the same way like the (image: ) tag does.
If I ever have to reorder or extend my product tree, I would also have to match all the links in my markdown files.
Edit: There seem to be completely different path handling in file: and image: tag. The image: tag, for absolute paths, will not work without the /content root folder.