Polymorphism: Difference between revisions
Appearance
No edit summary |
mNo edit summary |
||
| Line 12: | Line 12: | ||
<syntaxhighlight lang="php"> | <syntaxhighlight lang="php"> | ||
function recordActions($record, | function recordActions($record,</syntaxhighlight> | ||
</syntaxhighlight> | |||
Revision as of 23:21, 11 April 2007
|
ATK Howto: Polymorphism
|
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,