Jump to content

Ordering attributes within a node

From NusaATK
Revision as of 08:31, 29 August 2007 by Leon (talk | contribs) (Despam)

ATK Howto: Ordering attributes within a node

Complexity: Basic
Author: Ivo Jansch <ivo@achievo.org>

List of other Howto's

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);