Base Tag Library
Note: We have updated our folder structure in Neto 6 and this has not been updated on all tweaks yet. More info.

split

Based on the delimiter specified, will split out content into an array

Example

[%split delimiter:','%]
    [%param data1%]author1,author2,author3,author4[%/param%]
    [%param data2%]book1,book2,book3,book4[%/param%]
    [%param *header%]
        [@count@] is the number of items.
    [%/param%]
    [%param *body%]
        <p>[@data1@] is the author of [@data2@]</p>
    [%/param%]
    [%PARAM *footer%]
    [%/param%]
[%/split%]

Usage

The split tag will look at a set of data in a parameter then use neto's body tag format to allow for you to generate HTML around that data set. So the example shown above we take a number of authors and books, use the delimiter param to identify the , which then creates two data sets we print in the body tag using the corresponding data1 and data2 data tags into a paragraph.

Note : If using two data sets and one of them is longer than the first then the shorter one will return empty strings after its last array variable is returned and the longer string will keep returning until the max size is reached.

split Parameters

Name Options Description
delimiter:'' , ; | &amp; = Determine what character defines each set of data from the data param
data1:'' HTML & b@se The first set of data to process into the data1 data tag for the body param, this is required.
data2:'' HTML & b@se The second set of data to process into the data2 data tag for the body param, this is not required.
header HTML & b@se tags Renders a single usable space above the body
body* HTML & b@se tags Runs an array for each option in the tag
footer HTML & b@se tags Renders a single usable space below the body
ifempty:'' HTML & b@se tags If the type selected has no content pages, it will display this content

split Data Tags

Name Description
[@count@] Increments each time the tag is run
[@data1@] Prints the data collected in the data1 param
[@data2@] Prints the data collected in the data2 param