• Resolved astar177

    (@astar177)


    Hi Tobias.

    Firstly, may I say your TablePress plugin is fantastic and I am sure many agree with me that you are a real genius!

    Secondly, here is a question for you.

    I have several hundred CSV files that I want to post to a WordPress web site with Tablepress, many of which will feature the same cells value (IE “LONDON” is a repeated value on lots of the tables).

    Is it possible for me to somewhere intelligently prescribe that if a cell value is “LONDON” that it could automatically then be linked to a page/post or article on my site to LONDON, without me needing to manually link each instance?

    If so, how would you recommend I achieve this?

    Apologies if this enquiry has already been dealt with. I have looked in the documentation and on the forum but can’t see anything relevant?

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.

    For this, I suggest looking into using a plugin filter hook in some custom PHP code. For example, you could use the filter hook tablepress_table_render_data, see https://github.com/TobiasBg/TablePress/blob/6383ba8d874e256b7f39f73719de9b57f8409ae3/classes/class-render.php#L258, to get the table data before it’s printed to the page. There, you could do a search/replace in the table cells with PHP.

    Regards,
    Tobias

    Thread Starter astar177

    (@astar177)

    Hi Tobias. I really appreciated your fast response.

    Your solution sounds hopeful. When you mention a plugin filter hook, do you mean there is a particular plugin I can consider using? Would you recommend one.

    I am not really at developer level (although I’m always game to try anything) – is it hard to implement what you linked to at github.com?

    Also, would that work for potentially hundreds of values that I might want to be picked up as internal links?

    Regards

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    unfortunately, I’m not aware of an existing plugin, that already uses that filter hook in TablePress. You would need custom code here.
    I wouldn’t say that it’s hard to implement, as you won’t need much interplay with other plugin components. You’d just use that filter to get the data before it’s sent to the browser and then do string search/replace in the table cells.

    Regards,
    Tobias

    Thread Starter astar177

    (@astar177)

    Hi Tobias.

    I asked my web host about this and they suggested I try a plugin called WP All Import – https://www.wpallimport.com/ – in combination with Tablepress.

    Do you know much about this plugin and do you think it is a good thing to use to display hundreds of CSV tables imported by Tablepress?

    Do you think it will enable me to be smarter and do cleverer things with values that appear on multiple CSV tables (such as LONDON)?

    Thanks!

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    unfortunately, I don’t know that plugin at all, sorry. From what I can see on their website, it doesn’t offer direct TablePress import either, so I don’t think it will help here. ??

    Regards,
    Tobias

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Internally linking mass data from CSV’ is closed to new replies.