Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author vmallder

    (@vmallder)

    Hi Cedric,

    Thank you for sending your question. Yes, I think it would be possible. In fact, it might already exist. There are two additional keywords that the plugin can accept but I have not documented them yet. I plan to do that for the next release. But they might be helpful for you so I will explain them here.

    If you have a column in your table that contains the label you want to print for your link, and if you have a column in your table that contains the target for the link, then you can use the “link_labels” and “link_targets” keywords.

    Let’s say you have a column named columnX that contains the text “Click here for more info”.

    And lets say you have a column named columnY that contains “https://link-to-popup”.

    Then, in the tablemaster shortcode you could use these two keywords like this:

    link_labels=”columnX” link_targets=”columnY”

    And then TableMaster would print just one column that contains:

    Click here for more info

    Please let me know if this is helpful. And if not, then please give me a little more detail on what you are looking for and I will look into it.

    Thanks,
    Valerie

    Thread Starter cmalvache

    (@cmalvache)

    Hi Valerie,

    Thank you so much it’s almost what I want. It works.
    I just wish that the link open in a popup or a new page. Do you have an idea ?
    Cédric

    ps:Sorry for my english I’m french

    Plugin Author vmallder

    (@vmallder)

    Hi Cedric,

    I hope you are doing well. I’m glad those keywords worked for you. If you would like to open the link in a new window or new tab (depending on your browser settings), you could make a small change to a line of code in the tablemaster.php file.

    Open the tablemaster.php file in a text editor, hopefully a text editor that will show you the line numbers, and go to line 607. Line 607 currently looks like this:

    $output .= $td.'<a style="color:blue;text-decoration:underline;" href="' . $row[$links[$n]] . '">' . $row[$n] . '</a></td>';

    On line 607, insert this text right after the <a, and before the word ‘style’

    target="_blank"

    And so line 607 would end up looking like this:

    $output .= $td.'<a target="_blank" style="color:blue;text-decoration:underline;" href="' . $row[$links[$n]] . '">' . $row[$n] . '</a></td>';

    I could add this as an option to open links in a new window in the next release. And I will look into how to open the link in a popup. I believe I need to add some javascript to open the link in a popup. But I shall look into it. Thanks for the idea!

    Valerie

    Thread Starter cmalvache

    (@cmalvache)

    Hi Valerie,

    Many thanks!
    It works for me. Thanks again!
    Cédric

    so my confusion is this… what if there is NO label for the link? if the table only shows https://ad.fly/123454 i just want that as a link to that page. i dont have a seperate column to go with that column

    • This reply was modified 7 years, 7 months ago by falconcoin.
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Link’ is closed to new replies.