 |
 |
MD_Array_Sort.cfm |
 |
 |
 |
 |
 |
| TAG DESCRIPTION: |
 |
This tag will sort a 2D Array on the specified column(s). The tag will sort based on
one or more columns. If a column is not selected the tag will sort the array on the first column of the array. The tag will sort in
either ascending or descending order depending on what is specified. Ascending is the default sort order though. It is assumed that all
arrays will be comprised of a combination of text, numbers and / or dates so all sorts will be text based sorts. The tag allows you to
specify case sensitivity though.
|
 |
| TAG ATTRIBUTES: |
 |
Array_Name |
The name of the array to be sorted. This must be a populated 2D array. You must enclose
the name of the array in pound signs "#" to pass the array to the tag.
|
 |
 |
Sort_Order |
The column number(s) to sort the array by. You can specify one or more columns in the
array to sort on. Seperate the column numbers with a comma ",". The first column in the array is the default column to sort by. The sort
order must not contain spaces between the numbers. I.E. 1,2,3 = RIGHT. 1, 2, 3 = WRONG!!!
|
 |
 |
Asc_Desc |
"Asc" or "Desc", Desc by default. |
 |
 |
Sort_Type |
The type of sort to execute. Sort type can be: text -- Sorts text alphabetically,
uppercase before lowercase textnocase -- Sorts text alphabetically; case is ignored (default).
|
 |
| USAGE: |
 |
To use put paste the tag <CF_MD_Array_Sort> after the 2D array to be sorted has
been populated but before you display the contents of the array. The newly sorted array is will be able to be displayed as "TmpArray".
You will display the elements of TmpArray in the same order that you would display the elements in the array you are passing to the sort.
|
 |
| EXAMPLE: |
 |
<CF_MD_Array_Sort
Array_Name = #Name_of_the_array_to_sort#
Sort_Order= 1,2,3
Asc_Desc = 'Asc'
Sort_Type = 'text'>
|
 |
| SEE THE TAG IN ACTION: |
 |
CLICK HERE to see the tag in action |
 |
| DOWNLOAD THE TAG: |
 |
CLICK HERE to download a the tag |
 |
 |