Join two files like href and img src in HTML by means of Wiki markup?

Fragment of a discussion from Project:Support desk
Jump to: navigation, search

I don't think it gets better than what you're suggesting in the end. Two links with {{filepath:}} to generate an external link and feed it to the |link= parameter of the first link.

If you need this in many places you could create a template:

Template:PdfLink:

[[File:Farm-Fresh_file_extension_pdf.png|link={{filepath:{{{1|Example.png}}}}}]][[Media:{{{1|Example.png}}}|{{{2|{{{1|Example.png}}}}}}]]

And use {{PdfLink|Python_Programming.pdf|Python Programming}} to create:


Farm-Fresh file extension pdf.pngPython Programming

Krinkle02:23, 23 September 2011

Krinkle, thank you for your help. Admittedly it isn't exactly what I expected, namely one link like in HTML:

<a href="http://upload.wikimedia.org/wikipedia/commons/9/91/Python_Programming.pdf">
<img src="http://upload.wikimedia.org/wikipedia/commons/8/84/Farm-Fresh_file_extension_pdf.png" />Python Programming</a>


But your solution is also cool. I've created a "PDFLink" template according to your idea, and it works great. Thanks!

Danny37309:13, 25 September 2011
 
Personal tools

Variants
Actions
Navigation
Support
Download
Development
Communication
Toolbox