• Resolved Jean-Luc Vanhulst

    (@jlvanhulst)


    I have a (fairly large) table that has three different columns that will have an X in certain cells. The table is automatically synced from an external source. Works great.

    What I want is that the X is wrapped in a so that I can do a tooltip hover.
    Each column would have a different tooltip.

    Changing the external source is not an option. So I see two possibilities:
    – customize the auto-import to add the wrapping code for the cells that have an “X”
    – customize the table display code to add the wrapping code.

    Any thoughts on this?

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    The “customize the table display code” is probably the best way then, yes. You could use plugin filter hooks like tablepress_cell_content (see the code) in some custom PHP code here.

    Regards,
    Tobias

    Thread Starter Jean-Luc Vanhulst

    (@jlvanhulst)

    Thank you! Exactly what I was looking for!

    Plugin Author Tobias B?thge

    (@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 Jean-Luc Vanhulst

    (@jlvanhulst)

    Quick follow up question. I have a large table I have ‘split up’ on the same page by using filters. So [ id=”1″ ] with a filter, several times on the same page.

    It seems that using the tablepress_cell_content filter the $row_idx is the relative number (ie the row in the filtered table), correct? I would love to have access to the ‘original’ row number. Another thing I would love to be able to do in the filter is look in other cells across the same row. Any thoughts on that? I might end up /suggesting some fixes as well – just looking at it right now.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    correct, in this case, the $row_idx variable refers to the filtered set or rows.

    If you want access to the original row numbers, and other cells in the row, you should try using other filter hooks, like tablepress_table_render_data or tablepress_table_raw_render_data.

    Regards,
    Tobias

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Custom cell behavior for a column’ is closed to new replies.