• Resolved redquesm

    (@redquesm)


    I’m just wondering if it could be possible to add slugs to the content in a table cell in order to change that cell’s appearance when rendering. For example, I have a cell that I want to have a red background and I will have multiple copies of that table, but the cell(s) with a red background would differ so I’d like to put something in the cell like ~redcell~ and have that rendered as a class added to that particular cell like <td class=”redcell”>. I was thinking the same for adding a tooltip with something like $$Tooltip Text Here$$ and have it render with the title attribute for the cell. I have some php background and had a peek in the code but I’m just wondering how straightforward this would be to implement…on the surface it seems similar to the #colspan# slug already in use.

    https://ww.wp.xz.cn/plugins/tablepress/

Viewing 1 replies (of 1 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Unfortunately, I can’t offer a direct solution to this, and likely won’t be adding something like this directly to TablePress.
    Instead, I would suggest to look into coding a custom TablePress Extension, which uses the available plugin filter hooks to check for those keywords and then react accordingly. In your case, the tablepress_cell_css_class filter would probably be the best choice.

    Regards,
    Tobias

Viewing 1 replies (of 1 total)

The topic ‘Adding Slugs to table cells’ is closed to new replies.