i'm trying to get a custom title for the "current record" in a table (this table is named interviews) .
In this table i have a user_id and this table has a relationship with another table,
where this user_id has a surname, name etc.
now.. i would like, on the interviews table, to show as a title something like :
'interview of'. name and surname corresponding to this user id.
the only thing i guess is that i should use the function (in a delegate class) getTitle.
i tried with this
- Code: Select all
<?
class tables_interviews {
function getTitle(&$record){
return 'interview of' . $record->val('user_id');
}
}
but of course since $record refers to the current record i just get : interview of 1, interview of 2, etc.
Is there a variable i can use instead of $record or i should go for a custom query?
thanks for any hint!