Page 1 of 1

PostPosted: Mon Apr 23, 2007 9:07 pm
by pwg
Hi Steve,

I have a field that displays a rather long and complex URL that I would like to make 'live'. That is, when the user clicks the link it does not take her/him to a 'view' of the record but to the URL to which the link points.

I'm unable to figure this out from the current documentation on 'actions' (unless it isn't an 'action').

Can you give me some hints please?

PostPosted: Mon Apr 23, 2007 10:04 pm
by shannah

Hi Peter,

In the next version of dataface there is a delegate class method called %fieldname%__renderCell() that allows you to output custom content to be displayed in the list view for a certain field.


For the current version there is no way to do this in list view other than to do a custom list view (or to do a little javascript magic), which is a bit of overkill for this one thing.


You can, however, make the url like in the view tab but implementing the %fieldname%__htmlValue() method.
e.g.
function myfield__htmlValue(&$record){
ÊÊÊ return ''.$record->val('myfield').'';
}
The new version will be out soon... just working out a few minor details and docs for it.
Best regards
Steve

PostPosted: Tue Apr 24, 2007 1:57 pm
by pwg
Thank you, Steve. Very helpful. Looking forward to the next version.

Best

Peter