Jump to content

Ordering attributes within a node: Difference between revisions

From NusaATK
No edit summary
m OrderingAttributesWithinANode moved to Ordering attributes within a node
(No difference)

Revision as of 21:31, 8 June 2006

Ordering attributes within a node

By default, the order in which attributes appear in a node is based on the order in which they are added to it. You can influence this however by passing a positive integer as third parameter to atkNode's add() method.

If you don't pass this parameter, ATK will use increments of 100, starting with 100 for the first atttribute. So if you add an attribute later on, and want it to appear between the first and second attribute, pass 150 as third parameter, like this:

$this->add(new atkAttribute("value"), NULL, 150);

Original Poster: Ivo