 |
<dpArrayElement> lets you define elements within an array. It is always used in conjunction with <dpArray>.
<dpArrayElement name="arrayName" key="sort value">
Value
</dpArrayElement>
A T T R I B U T E S:
- name="arrayName"
- The name attribute is used for the name of the array you want to create. You should use the
same array name for each element you add to the array.
- key="sort key"
- The key attribute is used for sorting. For example, if you set a value of
"Alfred E. Neuman", you would probably want a key of "neuman, alfred e."
- value
- The value is whatever value you want to assign to that array elemnt. It usually contains all the HTML formatting you will want when you display the array.
D E T A I L S:
- <dpArrayElement> requires a name, key and a close tag
</dpArrayElement>. The value is technically optional, but it is fairly unlikely you would not set a value.
- The name value is the name of the array, such as "myList",
"authorArray", etc. Make sure you use the same name for all of the elements
you want to be a part of that array.
- The key value is used as a sort key. This is what <dpArray
sort="ascending"> operates on. A common example would be an author's name:
"last name, first middle".
- keys are case sensitive.
- The value can contain whatever output you want to store with that
element, like a link to an author's archive page. All leading and trailing
white space is trimmed off of the value.
- If you set two elements to the exact same key, it will overwrite the
existing key. Put differently, keys must be unique. This can be used to
your advantage in creating a unique list of elements from a larger list on
non-unique elements.
S E E A L S O:
Other tag examples that incorporate <dpArrayElement>
|
 |