Home: Support: Reference Guide: Miscellaneous Tags: <dpArray>

<dpArray>

D E F I N I T I O N:

<dpArray> allows you to sort and display values you set in an array using <dpArrayElement>. It is most commonly used to display unique and sorted lists of authors in your database.

<dpArray
  name="arrayName"
  sort="ascending|descending|asc|desc"
  number="all|#"
  return="value|count"
>


A T T R I B U T E S:

name="arrayName"

The name attribute is used for the name of the array you are referencing. It should be the same name you used when defining your array with <dpArrayElement></dpArrayElement>

sort="ascending|descending|asc|desc"

The sort attribute lets you sort the array either ascending or descending. Asc and Desc are aliases to ascending and descending. The default sort is ascending.

number="all|#"

By default <dpArray> will return "all" elements in the array. You may also optionally choose to loop through an array or request a specific element by using the number attribute.

return="value|count"

By default <dpArray> will return all the elements in the array. You may also optionally choose to get just a count of elements in the array. This is most commonly used in conjunction of looping through an array or checking the size of an array before displaying it.


E X A M P L E S:

<dpArray name="myList" sort="ascending">

myList has <dpArray name="myList" return="count"> values.

<dpLoop var="i" from="1" to="<dpArray name="myList" return="count">">
    <dpArray name="myList" number="<dpVar i>" sort="ascending">
</dpLoop>


D E T A I L S:


Home: Support: Reference Guide: Miscellaneous Tags: <dpArray>
Questions? Comments?
Please write support@desert.net.