'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.
- In the base class, 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 (unused in the base class)'

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

    if self.linkto:
        k = s3_str(k)
        return A(v, _href=self.linkto.replace('[id]', k).replace('%5Bid%5D', k))
    else:
        return v
