WordPress.org

Ready to get started?Download WordPress

Forums

TablePress
[resolved] adding email link (6 posts)

  1. jcgardiner@mac.com
    Member
    Posted 1 year ago #

    Everything looks great in my table of contacts but I would love to be able to allow the user to click the email address from the contact in the table to launch an email. Is this possible? If so how do I do this? Thanks in advance.

    JG

    http://wordpress.org/extend/plugins/tablepress/

  2. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    thanks for your question!

    There are two solution for this:
    The manual one would be to create a link for each email address, by using the "Insert Link" button below the table input fields. When asked for the URL for the link, you'd have to enter the email right after the "mailto:" keyword, as in

    mailto:info@example.com

    The second solution is the automatic solution. There's a TablePress Extension at http://tablepress.org/extensions/automatic-url-conversion/ that you can use and that will automatically convert all email addresses into clickable links.

    Regards,
    Tobias

  3. WillBrody
    Member
    Posted 1 year ago #

    Hi Tobias,

    For a table of about 250 lines, that will be based on data that is updated once/week, I'd like each line to be clickable. From your answer above, I believe the only way I can have a clickable link in a table cell from imported data is if the cell value starts off as a URL and is then converted to an HTML live link through the automatic url conversion extension. I presume I cannot have a word in the table cell automatically become a hyperlink, is that correct?

  4. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    thanks for your question.

    Well, yes, the "Automatic URL conversion" Extension can only turn URLs into automatically clickable links.
    To have a certain word made clickable, you would have to specify the intended target URL somehow. One possibility for this would be a custom Extension that uses PHP code to do this. How is the target URL defined in your case, or where is it stored? Can you maybe post an example of what you are trying to do?

    Regards,
    Tobias

  5. WillBrody
    Member
    Posted 1 year ago #

    For this particular table I am creating, the URL that I would like the word in column one of each row to link to would be the address of a page within the WordPress site.

    Here's an example of a table created with your TablePress and url extension with phony data in it

    http://expansion.vedicpandits.org/countryaffinity-funds-using-import-function

    you'll likely need this password to take a look because I didn't want it viewed with its phony data, while it's under development

    NOTforSHARING

    This table was created from data in a .csv file on the same server as hosts WordPress.

    The ideal table would have the country names as links leading to pages within WordPress which would offer more detailed information. My test table here adds a third column which holds the url (only set up for United Kingdom). Which is OK, if not as elegant as having a clickable link.

  6. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    thanks for the example!

    Well, as the URLs can not really be determined uniquely from the rest of the table data, there's no real way to do this automatically here. So, you will have to add the URL to the table manually anyway. Basically, it's now your choice to either add it to that new third column (you can then use the "Automatic URL conversion" Extension), or to add it as link HTML to the first column directly. That would give you the design that you prefer, but it would be more work, as you'd have to write HTML code manually.

    Regards,
    Tobias

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags