Using modifiers
Appearance
|
ATK Howto: Using modifiers
|
Modifiers allow you to modify nodes on before they are used. Making it possible to do such things as to add or remove attributes to a node before it is loaded.
Example of using modifiers:
Add in your module_preload.inc:
$modifiers[] = 'modules.node';
In your module_inc:
function module_node_modifier(&$node)
{
useattrib('atkDummyAttribute');
$node->add(new atkDummyAttribute('mydummyattrib','Dummy attribute added by modifier'), 'default',9999999);
}