# Accessing parent folder using the file: tag

**URL:** <https://forum.getkirby.com/t/accessing-parent-folder-using-the-file-tag/4270>\
**Category:** Questions\
**Tags:** v2\
**Created:** [May 30, 2016, 6:32am UTC](https://forum.getkirby.com/t/accessing-parent-folder-using-the-file-tag/4270 "2016-05-30T06:32:29Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![bmpan](https://avatars.discourse-cdn.com/v4/letter/b/53a042/32.png) [@bmpan](https://forum.getkirby.com/u/bmpan)\
**Post date:** [May 30, 2016, 6:32am UTC](https://forum.getkirby.com/t/accessing-parent-folder-using-the-file-tag/4270/1 "2016-05-30T06:32:30Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [May 30, 2016, 6:54am UTC](https://forum.getkirby.com/t/accessing-parent-folder-using-the-file-tag/4270/2 "2016-05-30T06:54:27Z")

</div>

You have to use the path to the file:

```auto
(file: parentfolder/filename)

```

---

<div class="post-metadata">

**Author:** ![bmpan](https://avatars.discourse-cdn.com/v4/letter/b/53a042/32.png) [@bmpan](https://forum.getkirby.com/u/bmpan)\
**Post date:** [May 30, 2016, 7:43am UTC](https://forum.getkirby.com/t/accessing-parent-folder-using-the-file-tag/4270/3 "2016-05-30T07:43:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [May 30, 2016, 7:52am UTC](https://forum.getkirby.com/t/accessing-parent-folder-using-the-file-tag/4270/4 "2016-05-30T07:52:20Z")

</div>

If you want to access a file in seriesA from the product one page, this would be the way to go:

```auto
(file: seriesA/product1.pdf)

```

Do not use the complete path starting from /content.

---

<div class="post-metadata">

**Author:** ![bmpan](https://avatars.discourse-cdn.com/v4/letter/b/53a042/32.png) [@bmpan](https://forum.getkirby.com/u/bmpan)\
**Post date:** [May 30, 2016, 11:04am UTC](https://forum.getkirby.com/t/accessing-parent-folder-using-the-file-tag/4270/5 "2016-05-30T11:04:52Z")

</div>

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)

but seriesA/file.pdf does not work for me.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [May 30, 2016, 11:14am UTC](https://forum.getkirby.com/t/accessing-parent-folder-using-the-file-tag/4270/6 "2016-05-30T11:14:06Z")

</div>

Oh, yes, sorry, you have to provide the full path, of course. Probably not my day today 😕

---

<div class="post-metadata">

**Author:** ![bmpan](https://avatars.discourse-cdn.com/v4/letter/b/53a042/32.png) [@bmpan](https://forum.getkirby.com/u/bmpan)\
**Post date:** [May 30, 2016, 11:54am UTC](https://forum.getkirby.com/t/accessing-parent-folder-using-the-file-tag/4270/7 "2016-05-30T11:54:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![distantnative](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/distantnative/32/11319_2.png) [@distantnative](https://forum.getkirby.com/u/distantnative)\
**Post date:** [February 6, 2025, 4:57pm UTC](https://forum.getkirby.com/t/accessing-parent-folder-using-the-file-tag/4270/8 "2025-02-06T16:57:56Z")

</div>

Archived on February 6, 2025, 4:57pm UTC


