Skip to content

Replacing Hyperlinks with Images

* Note: this requires phpGrid commercial licenses

It's possible to replace hyperlinks with images. Currently, it requires small customization to the set_col_dynalink() method. But It's actually simpler than you think.

In set_col_dynalink() function, all you have to do is to add a CSS class e.g. imglink, to the anchor tag,

return \'<a class="imglink" href="\'+url+\'" target="'.$target.'" value="\' + cellValue + \'">\'+cellValue+\'</a>\';

 then use the CSS to replace the link with a background image of your choice. An example here:

.imglink:{background:url(../images/link.png); }


Feedback and Knowledge Base