Volist tags are used primarily for looping output datasets or multidimensional arrays in templates
The required attributes are: The Name property, the data template variable to output, and the ID is the loop variable.
See the Development Manual for additional properties.
The result of the typical model's Select method is a two-dimensional array that can be output directly using the volist tag.
First, it is assigned to the corresponding controller.
$Student =m (' Student ');
$list = $Student->select ();
$this $assgn (' list ', $list);
Define the loop output number and name in the template
<volist name= "list" id= "Vo" mod= "1" >
{$vo. ID}
{$vo. Name}
</volist>
The Name property in the volist tag cannot be changed arbitrarily, but the ID property is not named the same as the Name property.
At the same time the label supports output part of the data, such as the output of the 5~15 record:
<volist name= "list" id= "Vo" offset= "5" length=10>
{$vo. Name}
</volist>
Supports output even records
<volist name= "list" id= "Vo" mod= "2" >
<eq name= "mod" value= "1" >{$vo .name}</eq>
</volist>
See the development manual for specific other tags
Volist label for processing template engine in thinkphp