Ticket #19 (closed enhancement: fixed)
URL Abbreviations
| Reported by: | sheep | Owned by: | sheep |
|---|---|---|---|
| Priority: | High | Milestone: | 1.5.0 |
| Component: | Hatta Wiki | Version: | 1.4.1dev |
| Keywords: | Cc: |
Description
Often your wiki is just a part of a more complicated system of web applications that are used together. Then you find yourself constantly linking to the same external URLs. This gets tiring quickly.
Hatta needs a page where you can define URL abbreviations, in form of URLs and their monikers. Then you can use the monikers to make links to those URLs. In addition, if the external web application changes or moves, you only need to correct the URL in one place.
Example:
You could define the moniker "ISBN" that points to http://www.amazon.com/dp/. Then, if you use link [[ISBN:0061673730|Zen and the Art of Motorcycle Maintenance]], it will automatically link to http://www.amazon.com/dp/0061673730.
Change History
comment:2 Changed 2 years ago by sheep
- Status changed from new to accepted
Creole markup doesn't specify how the link targets are interpreted: that's on purpose, to allow things like namespaces, special pages or InterWiki links like this. If the above would violate the Creole standard, then Hatta already does it with the "+download" and similar links.
comment:4 Changed 18 months ago by sheep
- Version changed from 1.3.3dev to 1.4.1dev
- Milestone changed from 1.4.0 to 1.5.0
comment:5 Changed 16 months ago by sheep
- Status changed from accepted to closed
- Resolution set to fixed
First implementation in changeset 20220e593a9d.
To use aliases, create a page named 'Alias' and put links into it like so:
* [[AliasName|http://example.com/]] * [[AnotherAlias|http://example.com/%s/foo]]
Then use the aliases like so:
[[AliasName:bar|this links to http://example.com/bar]] [[AnotherAlias:bar#baz|this goes to http://example.com/bar/foo#baz]]
comment:6 Changed 16 months ago by sheep
One change I am considering: using a ":" prefix for aliased links, like so:
[[:AliasName:bar|this links to http://example.com/bar]] [[:AnotherAlias:bar#baz|this goes to http://example.com/bar/foo#baz]]
This way there is no change of colliding with a page name with a colon in it...

If I may intervene, that's the reason why there are macros (<<isbn:0061673730|Zen and the Art of Motorcycle Maintenance>>) : to extend the language without getting out of the standard Creole Markup.
Please consider this option before diverting away from the CreoleMarkup too much.
Just my two cents.
-- Ben