Jump to content

Polymorphism

From NusaATK
Revision as of 23:21, 11 April 2007 by Uq2Vd0 (talk | contribs)

ATK Howto: Polymorphism

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

List of other Howto's

An example of polymorphism is given in a question that was sent to the mailinglist:


"Can I override view/edit action to go to other node? Say I have a node called Main which display part of table Main. Edit and View button should go to certain nodes based on particular attribute's value in node Main."


The best way to accomplish this is to override the link of the edit icon for a record, and have it link to another node instead of the current one.

Try to add the following to your main node:

function recordActions($record,