X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/7960031135e74f6d36abc4294dbadb687117222c..1640d12102c75d2214ab5117818e90182ba1a9ae:/doc/todo/shortcut_link_text.mdwn?ds=inline diff --git a/doc/todo/shortcut_link_text.mdwn b/doc/todo/shortcut_link_text.mdwn index d03d37411..952e84608 100644 --- a/doc/todo/shortcut_link_text.mdwn +++ b/doc/todo/shortcut_link_text.mdwn @@ -1,19 +1,19 @@ -[[plugins/shortcut]] creates link shortcut [[ikiwiki/PreprocessorDirective]]s, +[[plugins/shortcut]] creates link shortcut [[ikiwiki/Directive]]s, which substitute their argument into the specified shortcut URL to generate the link target, and use the argument as the link text. For example, given -the example [[shortcuts]], `\[[wikipedia ikiwiki]]` generates a link to +the example [[shortcuts]], `\[[!wikipedia ikiwiki]]` generates a link to , with the link text "ikiwiki". This works well in many cases; however, for things like the `debbug` example, it simply uses the number as the link text, which does not always provide enough context to understand the link at first glance. For example, -`\[[debbug 397501]]` generates a link to , +`\[[!debbug 397501]]` generates a link to , with just "397501" as the link text. While [[plugins/template]] provides a general solution for arbitrary cases, it would help to have a simple option via the shortcut plugin to set the link text, with a `%s` substitution. -Thus, something like `\[[shortcut name=debbug +Thus, something like `\[[!shortcut name=debbug url="http://bugs.debian.org/%s" desc="bug #%s"]]` might suffice on a Debian-specific wiki to indicate a bug number, while a more general wiki -might use something like `\[[shortcut name=debbug +might use something like `\[[!shortcut name=debbug url="http://bugs.debian.org/%s" desc="Debian bug #%s"]]`. > [[todo/done]] --[[Joey]]