'Represent a (key, value) as hypertext link.
- Typically, k is a foreign key value, and v the
representation of the referenced record, and the link
shall open a read view of the referenced record.
- The linkto-parameter expects a URL (as string) with "[id]"
as placeholder for the key.
@param k: the key
@param v: the representation of the key
@param row: the row with this key'

def link(self, k, v, row=None):

    if (not k):
        return v
    if v.startswith('http'):
        return A(v, _href=v)
    contact_method = row.contact_method
    if (contact_method == 'TWITTER'):
        url = ('http://twitter.com/%s' % v)
        return A(v, _href=url)
    elif (contact_method == 'FACEBOOK'):
        url = ('http://%s' % v)
        return A(v, _href=url)
    else:
        return v
