]> sipb.mit.edu Git - ikiwiki.git/blob - doc/todo/shortcut_link_text.mdwn
web commit by JoshTriplett: See "using the web interface with a real text editor...
[ikiwiki.git] / doc / todo / shortcut_link_text.mdwn
1 [[plugins/shortcut]] creates link shortcut [[PreprocessorDirective]]s,
2 which substitute their argument into the specified shortcut URL to generate
3 the link target, and use the argument as the link text.  For example, given
4 the example [[shortcuts]], `\[[wikipedia ikiwiki]]` generates a link to
5 <http://en.wikipedia.org/wiki/ikiwiki>, with the link text "ikiwiki".  This
6 works well in many cases; however, for things like the `debbug` example, it
7 simply uses the number as the link text, which does not always provide
8 enough context to understand the link at first glance.  For example,
9 `\[[debbug 397501]]` generates a link to <http://bugs.debian.org/397501>,
10 with just "397501" as the link text.  While [[plugins/template]] provides a
11 general solution for arbitrary cases, it would help to have a simple option
12 via the shortcut plugin to set the link text, with a `%s` substitution.
13 Thus, something like `\[[shortcut name=debbug
14 url="http://bugs.debian.org/%s" desc="bug #%s"]]` might suffice on a
15 Debian-specific wiki to indicate a bug number, while a more general wiki
16 might use something like `\[[shortcut name=debbug
17 url="http://bugs.debian.org/%s" desc="Debian bug #%s"]]`.
18
19 > [[todo/done]] --[[Joey]]