Insert Node Parameter: override (6-1.3) [special]

WARNING

This parameter is considered a security hazard. There is an option in your format definition that you have to turn on in order for the feature to work. When not selected, override is ignored. Only allow this feature in an input filter where you can trust users 100%.

One can use the override parameter to replace the expected data with their own data. Although one would think using the data directly would work as well, there are cases when this is useful.

By default the InsertNode module gets data from the $node object as defined by the system. At times, the data available in the node needs to be tweaked with a forced value. This parameter is used for that purpose.

The parameter can be set to two different type of values:

  • Node parameter
  • CCK parameter

The node parameter is defined with this syntax:

override=<field name>:<value>

The CCK parameter is defined with this syntax:

override=cck:<field name>:<value>:<key>:<index>

In both cases, <field name> is a field found in the $node object (i.e. $node->$field_name). This field is required.

In both cases, <value> is the new value of the indicated field. This field is required.

The <key> indicates the CCK field value name. By default it is 'value', which is what is necessary in most cases. This field is optional.

The <index> represents the array index. The default is 0. Remember that the array is zero based. So the 3rd item has index 2.

See Also: Insert Nodes used as a macro (6.x-1.2)