• Resolved ngjarman

    (@ngjarman)


    I apolgise for asking a question which on the face of it breaks the concept of table-based data!

    I want to start a drill-down of my data with just the year, so ideally I might have three boxes across the page with 2025; 2024; 2023 and then on the next line 2022; 2021; 2020 etc etc.

    I realise there are static solutions, and dynamic from the DB, but can I pull the data from a “Years” tablepress table to feed this page?

    Many thanks, NEIL

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

    (@tobiasbg)

    Hi!

    Thanks for your post and sorry for the trouble!

    To be honest, I’m not sure that I understand. Are you simply looking for a 2 rows by 3 columns grid with the years here (which are then probably links)? Or: What is a “flow grid”?

    Best wishes,
    Tobias

    Thread Starter ngjarman

    (@ngjarman)

    Hello Tobias,

    Yes that is exactly what I would like. I used the “flow” phrase to emphasise that in a mobile layout the grid would be responsive and probably not 2 x 3 etc, apologies if that caused confusion.

    Of course I can do it other ways, I was just hoping to hook into tablepress so all my data is in one place, which is clearer for the user who will be entering this data.

    Kind regards, NEIL

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for the clarification! In principle, this is possible, but the options for responsiveness are limited here, as the foundation of that “grid” would still be an HTML table. In order to not have to mess around with ugly CSS that would break the semantics of the HTML code, it will likely be better to use e.g. CSS flexbox on a bit of custom HTML for this.

    Best wishes,
    Tobias

    Thread Starter ngjarman

    (@ngjarman)

    Hello Tobias.

    I understand. However my question is how can I extract the data from your table using code – I cannot find an example which would let me iterate through a table’s content using a php for or while loop.

    Many thanks, NEIL

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    The TablePress Single Cell Shortcode Extension from https://tablepress.org/extensions/table-cell-shortcode/ could be helpful for that. Its code also shows how the access table data in PHP.

    Best wishes,
    Tobias

    Thread Starter ngjarman

    (@ngjarman)

    Hello Tobias,

    Many thanks for your input, much appreciated.

    Kind regards, NEIL

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi @ngjarman,

    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 in the plugin directory. Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.