• Resolved janetfong

    (@janetfong)


    hello,

    I am trying to use this plugin for nicer-looking tables on my website, but the hyperlinks do not seem to work (all cells apart from the first column and head row should contain a hyperlink) Any help would be appreciated.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    The reason for this is that the link text for all your links is not “inside” the link code, but in front of it.
    For example, you have this in the cells:

    Physiology<a href="https://hkca.edu.hk/ANS/exams/past_papers/intermediate_papers/I2019(1)_physio.pdf" rel="noopener" target="_blank"></a>
    

    To make the link clickable, the link text needs be before the </a>. Thus, please change this to

    <a href="https://hkca.edu.hk/ANS/exams/past_papers/intermediate_papers/I2019(1)_physio.pdf" rel="noopener" target="_blank">Physiology</a>
    

    Regards,
    Tobias

    Thread Starter janetfong

    (@janetfong)

    Thank you so much for your prompt reply and solution!

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Good to hear that this helped!

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

    Thread Starter janetfong

    (@janetfong)

    Hello Tobias,

    May I seek your help again?

    I have this table here https://www.hkca.edu.hk/~hkcaweb-01/wordpress/test. I have had the “use datatables” checked, but such functions were not shown.

    Would be grateful if you could take a look at it.

    Many thanks!
    Janet

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi Janet,

    the reason for this is that you are using combined/merged cells in the header row. Unfortunately, the DataTables JS library does not support this ?? It requires that tables don’t have such combined cells.
    So, if you want to use the JavaScript features, you’ll have to remove all #colspan# and #rowspan# from the table. Sorry for not having better news here.

    Regards,
    Tobias

    Thread Starter janetfong

    (@janetfong)

    Thank you again Tobias, very helpful as usual.

    One more question- would it be possible to limit the sorting function to certain headers only (eg. visitors can only sort table with first header and not the others)?

    Many thanks,
    Janet

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi Janet,

    yes, that’s possible!

    To only allow sorting of the first column of this table, please add this to the “Custom Commands” text field on the “Edit” screen of the table:

    "columnDefs": [ { "orderable": false, "targets": [ 1, 2, 3, 4 ] } ]
    

    (but you would still have to remove the #colspan#).

    Regards,
    Tobias

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘hyperlinks do not work’ is closed to new replies.