Template:Short

From FollowTheScore
Revision as of 18:02, 23 July 2009 by Subfader (talk | contribs) (New page: <includeonly>{{#ifexpr:{{#len: {{{string|}}} }} > {{#expr:{{{count|25}}}+5}}|{{#sub:{{{string|}}}|0|{{{count|25}}}}}{{{suffix|}}}|{{{string|}}}}}</includeonly> <noinclude> ==The template==...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


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}}...