[dokuwiki] image link to pdf file

  • From: Fourhundred Thecat <400thecat@xxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Sun, 14 Jun 2020 08:34:44 +0200

Hello,

I have image on my page, and when clicked, a pdf file should be
opened/downloaded. I have ended up with following syntax:

 [[this>_media/books/test/file.pdf|{{.:img:pic.jpg?100}}]]

The path of the pdf is actually /books/test/file.pdf, but I have created
a symlink in my dokuwiki folder

  media -> pages

so that the path _media/books/test/file.pdf also works. This is ugly,
but nothing else worked.

Using _media/ at the beginning was the only way I could find, to treat
file.pdf as filename, instead of pagename file.pdf.txt

So, the above works, but has the problem that the link to the pdf file
is using absolute path. Whenever I move the directory around, the
absolute path breaks.

How can I use relative paths when linking to pdf file?

Is my approach described above the right approach at all?

Is there better way to do that?

thanks,
--
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Other related posts: