From: Ralf <ral...@kr...> - 2013-08-27 08:07:17
|
Well, the "padleft" magic word does not really do what I want. {{padleft:|40|This is a text.}} results in This is a text.This is a text.This is a Instead the following Parser Function works {{#sub:This is a text.|0|4}} if you set $wgPFEnableStringFunctions = true; The #sub is built in ParserFunctions (StringFuncitons not needed). Ralf On Tuesday 27 August 2013 Ralf wrote: > Hi Alexey, > > thanks for the hint. > > I found a built-in method by using a magic word: > > {{padleft:|4|This is a text.}} > > prints just the first 4 characters: "This". > > http://www.mediawiki.org/wiki/Help:Magic_words#Formatting > > However, setting the amount of characters to be printed would be a nice > feature for some Semantic Result Formats in order to avoid the usage of a > formatting template ;-) > > Cheers > Ralf |