Template:Short
From FollowTheScore
The template
{{#ifexpr:{{#len: {{{string|}}} }} > {{#expr:{{{count|25}}}+5}}|{{#sub:{{{string|}}}|0|{{{count|25}}}}}{{{suffix|}}}|{{{string|}}}}}
Usage
This shortens strings. This can be used to shorten URLs or included text.
- Usage
{{Short |string = |count = |suffix = }}
- count: optional / default: 25
- suffix: optional / no default for because of wiki markup for URLs
- Example URL
[http://en.wikipedia.org/wiki/Mediawiki#Extensions {{Short|string = http://en.wikipedia.org/wiki/Mediawiki#Extensions|count=30}}...]
{{Short|string=http://en.wikipedia.org/wiki/Mediawiki#Extensions|count=30}}...