Make the linkpath value dynamic and hot / clickable

I have a dynamic table displaying the results of a db search (http://www.mindfulmoment.be/practitioners-search). The column definitions have an attribute LINKPATH that I believe allows me to make the contents of the cell clickable.

My Question:
How can I make the value of linkpath = the value of the text in the cell and clickable? For instance, one cell is an EMAIL address and one cell is a WEBSITE URL. I want these to be clickable. Also, I realize the email address needs a mailto: in front of it. Another possible snag.

Here is a column-definition snippet from my code where LINKPATH shows:

$w(“#table1”).columns = [
{
“id”: “coll-em”, // ID of the column for code purposes
// The field key in the collection whose data this column displays
“dataPath”: “email”,
“label”: “email”, // The column header
“width”: 200, // Column width
“visible”: true , // Column visibility
“type”: “string”, // Data type for the column
// Path for the column if it contains a link
“linkPath”: “link-field-or-property”
},

Any thoughts?

Thank you kindly for any help… Cynthia

1 Like

Did you figure out all of the Wix Code request, like this one, from all of your other posts? I have solutions I can share, but I don’t want to write them all out if you’ve cracked them.

-Nelson

Thank you, Nelson. No. As a matter of fact, I NEVER got an exact answer regarding either:

ONE
How the LinkPath attribute is used. I can’t find any references to it when I search the resource materials and the forum. I messed around with it and never got it to work…

OR, TWO (and this is what I was really after here)
When creating a table of query results (not a dynamic page table), how to actually make a table row or cell clickable to a dynamic ITEM page for that record being clicked on in the table. NEVER figured this out… and I can’t find an example that uses code for it either.

The closest I could come was a dynamic-page table, NOT a search-results table - and these are 2 totally different situations.

I came up with a workaround/re-design, but it was not the best solution.

If you can shed light on this (primarily # TWO) I would be most appreciative. But if it is a LOT of work to do so, no worries. What I have now is fine. : -)

Thank you again. Cynthia-

Hi there Cynthia, were you ever able to figure out #2? I’m frustrated struggling with the same issue right now, but I am displaying my query results in a repeater format rather than a table.

I hope you were able to figure it out and I’ll be able to apply your solution to my repeater!!

Thank you!

Hi there Cynthia, were you ever able to figure out #2? I’m frustrated struggling with the same issue right now, but I am displaying my query results in a repeater format rather than a table.

I hope you were able to figure it out and I’ll be able to apply your solution to my repeater!!

Thank you!