There are two ways to add a hyperlink to a data table:
- Add a hyperlink column
- Add a dynamic hyperlink
Hyperlink column #
A hyperlink column is a table column which is physically stored in the database. With this type of hyperlink you can add a specific hyperlink to each table row. The plugin generates the necessary features to support hyperlink editing in the data entry form. You can enter a label, url and target. An example could be a link to product specifications on the site of the product supplier.
Inline demo (try column hyperlink) #
Name | Image | In Stock | Hyperlink | Description |
---|---|---|---|---|
Name | Image | In Stock | Hyperlink | Description |
Dynamic hyperlink #
A dynamic hyperlink is a computed column generated on the fly. Column variables can be added to a hyperlink and are substituted on generation.
Inline demo (try column actions) #
Actions | Name | Image | In Stock | Description |
---|---|---|---|---|
Actions | Name | Image | In Stock | Description |
This example uses the following HTML to create the actions links
<a href="javascript:alert('Action not implemented for $$product_name$$')" class="dashicons dashicons-plus-alt"></a>
<a href="javascript:alert('Action not implemented for $$product_name$$')" class="dashicons dashicons-dismiss"></a>
<a href="javascript:alert('Action not implemented for $$product_name$$')" class="dashicons dashicons-admin-generic"></a>
Notice that variable $$product_name$$ is substituted with the column value of each row.
Hi there
The link for “More information about hyperlink columns⦔ on https://wpdataaccess.com/docs/data-tables/hyperlinks/ is broken.
I am trying to learn about this.
Thanks
Steve Fulton, UE
Thank you for reporting Steve! I fixed the broken link . Let me know if you have any questions.
Thanks,
Peter
Hi,
I was wondering if it was possible to change the name of the hyperlink within the popup window, because it has currently “wpda_hyperlink_0” as a label.
Thank you in advance for your time and answer.
ZZ
Hi Zerzer,
That is a bug! While I am typing this message I am uploading version 3.6.5 which contains a fix for this issue. š You just need to update… š
Thanks for reporting,
Peter
Hi Peter,
Thanks you very much for your work, it is as you say š
Have a good day,
ZZ
Hello Peter,
I am a bit novice in this area and I need a bit of help. I cannot figure out how could I attach a dynamic link to an image. Click on the image would bring me to a page of the product I clicked on it’s image. I have my image column set to Image URL
I cannot send the link to a site because I am still on localhost.
Thank you for your answer and have a nice day,
Igor
Hi Igor,
You can use a dynamic hyperlink. In your case you need to write a kind of HTML template in the HTML field. This could for example be something like:
<a href=”<your-product-url>/product-$$product_id$$.php”><img src=”<your-image-url>/product-$$product_id$$.gif”></a>
The plugin will substitute $$product_id$$ with the value of column product_id for each row and and image with a hyperlink.
Here is the documentation for dynamic hyperlinks:
https://wpdataaccess.com/docs/data-explorer-settings/dynamic-hyperlinks/
Does this help Igor?
THX Peter
Hello Peter,
Thank you for your quick reply- I even couldn’t see it on the same day for I had to dedicate my time to some other work
I succeded to make a dynamic link for a picture. I made it like that (this is not exactly the end of job but it’s one step)
Interesting – the dynamic link didn’t do the work when I inserted a link to the picture, like this:
where in a database I have exactly the same link for example:
http://localhost/geonext/luxtek/wp-content/uploads/2020/10/0931480660.jpg
I’m also sending dropbox links for two pictures perhaps they will enlighten if I my words were clumsy.
https://www.dropbox.com/s/vkica4bihkotk0i/2020102601-WPACCESS-01.1.png?dl=0
https://www.dropbox.com/s/z84o428flexrbnk/2020102602-WPACCESS-02.png?dl=0
Now I have to prepare a file to accept the id ($$codigo$$) of product
Thank you very much for your help!
Have a nice day,
Igor
Hi Igor,
You should be able to use a column value for your links and pictures both. The plugin just substitutes the placeholders. What values are stored in column imagem-id-link?
Thanks,
Peter