From: Philipp Z. <zal...@on...> - 2010-04-28 10:46:13
|
Hi Neill, that is possible by using the sub parser function. Simply choose a template as result printer for your query. Within that template then use the sub parser function to shorten your text. E.g. {{#ifexpr: {{#len:{{{1|}}}}} > 300 | {{#sub:{{{1|}}}|0|300}} ... | {{{1|}}} }} checks if the output parameter {{{1}}} contains more than 300 characters and if so cuts the rest and appends " ...". regards, Philipp Am 28.04.2010 11:58, schrieb Neill Mitchell: > Hi. > > Is there a way to limit the number characters returned by a field in a > query e.g. to the first 40 characters? I'd like this to show a summary > of a text field rather than the whole content in a table so it looks > something like: > > "The purpose of this document is to describe how to get this to work. It > does this by..." > > I've check the documentation, but can't see if this is possible or not. > > Cheers > Neill. > > ------------------------------------------------------------------------------ > _______________________________________________ > Semediawiki-user mailing list > Sem...@li... > https://lists.sourceforge.net/lists/listinfo/semediawiki-user > -- Philipp Zaltenbach Halo Team ontoprise GmbH – know how to use Know-how - - - Halo Extension - Want to get involved? http://smwforum.ontoprise.com/development - - - An der RaumFabrik 29; 76227 Karlsruhe; Germany Tel.: +49 721 509809-0; Fax: +49 721 509809-11 mailto:zal...@on..., www: http://www.ontoprise.com Registered Office: Karlsruhe, Germany, HRB 109540 Managing Directors: Prof. Dr. Juergen Angele, Hans-Peter Schnurr |