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

    (@tobiasbg)

    Hi Geary,

    thanks for your question.

    What do you mean with “latest”? Are these always in the same position of the table or do you mean this based on the date/time the rows were added?

    If they are in the same position at all times (i.e. always have the same row numbers), you could use the “hide_rows” and “show_rows” Shortcode parameters. If this is based on the date/time, I don’t know a possibility for this, because TablePress doesn’t store information about when a row was added. Sorry.

    Regards,
    Tobias

    Thread Starter moonspellsquinte

    (@moonspellsquinte)

    Yes, it would be based on the time/date the row was added. I have several tables/pages setup and would like to show the latest entries (date/time) from each of those tables on the parent/root page of my site.

    Looks like it’s not doable though…? too bad 🙁

    Thanks for the quick reply!
    Geary.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for the clarification. No, sorry, this is not possible then, as TablePress just doesn’t store that information. Sorry…

    But maybe you can use the Row Filter Extension from http://tablepress.org/extensions/row-filter/ as a workaround: At first, you would create a new column in the table (probably a new first column), and hide it from being shown in the final table, by using the “Selected Columns: Hide” button below the table input fields.
    Whenever you then edit the table, you could add some keyword like “latest” to the first column of all new rows (and remove it from the first columns of all no-longer-new rows). After that, you could use the new parameter that the Filtering Extension brings, to show only those rows of a table that have that keyword in the first column:

    [table id=123 filter="latest" filter_columns="1" /]

    This is some small extra work, but it should be a reliable solution.

    Best wishes,
    Tobias

    Thread Starter moonspellsquinte

    (@moonspellsquinte)

    ok, that works for me!

    Now… is it possible to to remove the top and bottom portions of the table within the shortcode or some other method.

    i.e.

    TOP….
    Show # entries
    Search

    Bottom
    Showing entries
    Previous & next.

    Thanks!

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    sure. Those are the extra features that are added by the DataTables JS library. To turn them off, just uncheck the “Use DataTables library” in the “Features of the DataTables JavaScript library” on the “Edit” screen of the table.

    Regards,
    Tobias

    Thread Starter moonspellsquinte

    (@moonspellsquinte)

    ya…

    unfortunately that removes those options from the pages where the full table are. I need to have those options on the table pages… but not on the latest entries root page of the website.

    G.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    ah, ok 🙂 That makes sense of course.
    Fortunately, there’s a simple solution as these can also be turned of via a Shortcode parameter. So, instead of unchecking that checkbox, please change your Shortcode to

    [table id=123 filter="latest" filter_columns="1" use_datatables=false /]

    Regards,
    Tobias

    Thread Starter moonspellsquinte

    (@moonspellsquinte)

    Cheers. 🙂

    Thank you so much. You were so much help.

    Excellent plugin.

    G.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! 🙂

    Best wishes,
    Tobias

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

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Latest table entries?’ is closed to new replies.