relayman357
relayman357

Reputation: 855

click icon and open target directly

I have a table in my wiki as below. Right now when I click on the red pdf icon it takes me to the file description page for the target file, myfile.pdf.

Instead, I want it to immediately open the myfile.pdf, not require 2 clicks to get it open.

enter image description here

Below is what that table cell entry looks like (1st row, 2nd col in the table). How do I modify it to do what i want?

[[Image:Pdf_icon.png|20px|link=File:myfile.pdf]] 

Upvotes: 0

Views: 98

Answers (1)

Noam
Noam

Reputation: 1604

You can use one of the following methods:

[[Image:Pdf_icon.png|20px|link=Special:FilePath/myfile.pdf]]

or

[[Image:Pdf_icon.png|20px|link={{filepath:myfile.pdf}}]]

The slight difference is that the first method links to an internal special page that automatically redirects to the file, and the second method generates a direct link to the file.

Upvotes: 1

Related Questions