Aus SubmersWiki

Wechseln zu: Navigation, Suche
  • To do this you need to have the Semantic Forms parser function #arraymap in your template. The generic call for this function is:
 {{#arraymap:value|delimiter|var|formula|new_delimiter}}

The function splits the value by the delimiter, then, for each one, applies the same mapping that 'formula' does to 'var', and finally joins all the values again using the new delimiter.

  • If you choose to use the CreateTemplate page to create a template you should:

Apply #arraymaptemplate onto the main template field just as you would with #arraymap, using the format:

 {{#arraymaptemplate:value|template|delimiter|new_delimiter}}

template = Name of the mapping template in question.
For both #arraymap and #arraymaptemplate, the string "\n" in the value of either 'delimiter' or 'new_delimiter' will get converted into a newline.
If you want an actual line break to appear between values, you should have two newlines (i.e, "\n\n") as the delimiter.



Copyright © 2009 Ontoprise GmbH.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the article "GNU Free Documentation License".


Diese Seite wurde zuletzt am 12. Dezember 2010 um 12:46 Uhr geändert.Diese Seite wurde bisher 1.630-mal abgerufen.