csvToTpl Icon

csvToTpl

By Andrew Ward (scorchsoft)

csvToTpl first screenshot

This is the first public version of csvToTpl.

To use this module simply pass it a CSV string along with the tpl that you would like to use to process this string.Simple usage:

[[!csvToTpl? &csv=`my, text, csv` &tpl=`myTpl.tpl`]]

Use a different tpl for a certain item:

[[!csvToTpl? &csv=`my, text, csv` &tpl=`myTpl.tpl` &tpl_3=`myTpl3.tpl`]]

note: the first tpl is &tpl_0

tpl variables:
  • [[+item]] = the item in the CSV array.
  • [[+itemUCFirst]] = the csv item with the first letter capitalised.
  • [[+itemUCWords]] = the csv item with the first letter of all words within it capitalised.
  • [[+itemCaps]] = the csv item with all letters capitalised.
  • [[+itemClass]] = the csv item made lowercase and all non-alphanumeric characters replaced with a hyphen (-).
Example TPL

normal: [ [+item]]
ucfirst: [ [+itemUCFirst]]
ucwords: [ [+itemUCWords]]
caps: [ [+itemCaps]]
class friendly: [ [+itemClass]]

Andrew Ward


New in csvToTpl 1.0.1-pl1

There are no release notes for this version.

More

Information

Released
Supported Versions
2.2 – 2.3
Downloads
603
License
GPLv2

Previous Versions

More