X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/fc760812130b2acfad6105d8444af730d3785cbe..2fc21bff0adc27d9374aa6b5f5011ca422df47d8:/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn?ds=inline diff --git a/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn b/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn index 3b19bab15..3f2713678 100644 --- a/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn +++ b/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn @@ -1,3 +1,5 @@ +[[!template id=gitbranch branch=wtk/linktoimageonly author="[[wtk]]"]] + how can I create a link to an image which is part of the wiki, without having it inserted in my page? I tought this: @@ -49,14 +51,22 @@ Any hints? --[[jerojasro]] >>> * Have things that are wikilink-aware (like [[plugins/brokenlinks]] >>> treat your link to the image as a wikilink. >>> * Use standard wikilink path stuff (and not have to worry about ->>> a raw html link breaking if the page it's on is inlined, for +>>> a relative html link breaking if the page it's on is inlined, for >>> example). >>> >>> I can help you bang that plugin into shape if need be. --[[Joey]] ->>>> both my plugin and your suggestion yield broken html links when inlining the page (although propably that's what is expected from your suggestion (`[]()`)) +>>>> both my plugin and your suggestion yield broken html links when inlining the page (although probably that's what is expected from your suggestion (`[]()`)) >>>> >>>> I thought using the `bestlink` function would take care of that, but alas, it doesn't. >>>> Get the "plugin" [here](http://devnull.li/~jerojasro/files/linktoimgonly.pm), see the broken >>>> links generated [here](http://devnull.li/~jerojasro/blog/posts/job_offers/) and the source >>>> file for that page [here](http://git.devnull.li/cgi-bin/gitweb.cgi?p=blog-jerojasro.git;a=blob;f=posts/job_offers.mdwn;hb=HEAD) --[[jerojasro]] + +>>>>> Use this --[[Joey]] + + return htmllink($params{page}, $params{destpage}, $params{"img"}, + linktext => $params{text}, + noimageinline => 1); + +> [[patch]]: I've updated this plugin for the current ikiwiki. --[[wtk]]