Hey everyone!
With the holiday season upon us, we want to share our upcoming working hours:
- New Year: Our team will be off on January 1st and 2nd. We’ll be back on Friday, January 3rd, to respond to any messages received during this time.
- Weekend: As usual, we don’t work on weekends, so January 4th and 5th will also be non-working days.
- Orthodox Christmas: Our office will be closed on Monday and Tuesday, January 6th and 7th for the holiday.
After that, we’ll return to our regular schedule and assist you as quickly as possible.
In the meantime, you can explore our documentation for Amelia and wpDataTables. You'll find tons of helpful resources, including articles and handy video tutorials on YouTube (Amelia's YouTube Channel and wpDataTables' YouTube Channel), which might just have the answers you need while we’re away.
Thanks a bunch for your understanding and support!
Warm regards and happy holidays!
TMS
I created a table using SQL.
Code:
SELECT id AS UserID FROM wp_users
Execution result:
UserID
1
2
3
4
...
I want to use this to create a link to the user page.
ProfilePage
mydomain/wp-admin/user-edit.php?user_id=1
mydomain/wp-admin/user-edit.php?user_id=2
mydomain/wp-admin/user-edit.php?user_id=3
mydomain/wp-admin/user-edit.php?user_id=4
...
Is there a way to achieve this?
Hi Kohei
Thank you for reaching out to us.
If I understand correctly you want an entry from the table as a hyperlink that would take the visitor to the specific post or page? That link would be dynamically generated by the content of the cell, right?
If that's true, you could use the CONCAT function, like this:
This will create a hyperlink to www.yourwebsite.com/page1/value1 if there's "value1" entered as cell data in column3. On another row, it could be www.yourwebsite.com/page1/value2 if there's "value2" in the cell, and so on. So, this would be a hyperlink which could be shown in the modal, and it would take the user to the respective page.
I hope this helps, do let us know if you need any further assistance.
Hi Blaženka,
Thank you! It certainly did what I wanted it to do with this code.
One more question, how can I open the hyperlink created in this way in Modal? You said "this would be a hyperlink which could be shown in the modal", but these hyperlink are normal link.
I would like to open the link in modal if possible.
Hi Kohei
Please have a look at our Master Detail addon which you can use to display information in this way
https://wpdatatables.com/documentation/addons/master-detail-tables/
Do let us know if you need any further assistance.
Hi Blaženka,
I understand that the MD add-on popup is for a horizontal table with many columns (e.g. 50 columns), and if the first 5 columns are displayed, clicking on a row will show the information contained in the remaining 45 columns.
Is my understanding of the above wrong?
If I use the MD add-on, am I correct in assuming that the table containing the URL (link) will open the link as a popup (like an iframe) when I click on the link?
Hi Kohei
You can choose what information you want to display in the MD modal, so it doesn't have to be just additional information from other columns, you can choose to display only this link on a row click but if will still be displayed as a link you won't be able to display the content of the link in the modal I'm afraid.
Hi Blaženka,
Thank you! I'll look MD option.
Please close this ticket.
You are most welcome
If there is anything else we can assist you with please don't hesitate to open a new ticket.
Have a wonderful day!