• Resolved JVCode

    (@jvcode)


    I’m using TablePress as a games listing feature, but with hundreds of games in one table, it becomes a chore searching for the game you’re wanting to view. Is there a A-Z (not sortable but listing A-Z letters and only displaying the letter you choose) tool available or possible with Tablepress? Any help is much appreciated.

    http://wordpress.org/extend/plugins/tablepress/

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

    (@tobiasbg)

    Hi,

    thanks for your question.

    Unfortunately, I’m not aware of an existing solution for that, sorry.
    There is a different way of pagination available, by adding

    "sPaginationType": "full_numbers"

    to the “Custom Commands” textfield on the “Edit” screen of the table, but that will not be A-Z but only a pagination with numbers.

    For a real A-Z paging, you might want to take a look at the Row Filtering Extension from http://tablepress.org/extensions/row-filter/
    If you combine that with the Extension http://tablepress.org/extensions/shortcode-filter-get-parameter/
    you could create custom/manual A-Z links that would then only show those elements from the table that match the letter.
    That’s not as flexible as a full JavaScript pagination though, but it’s the only idea that I can come up with right now.

    Regards,
    Tobias

    Thread Starter JVCode

    (@jvcode)

    Thank you, I’ll install the above extensions, what would I need to the custom commands area when I’ve installed the extensions ?

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    those Extensions don’t need any “Custom Commands”, they just need to be activated/adjusted with the Shortcode parameters as mentioned on the pages.

    The suggestion with the “Custom Command” that I posted is independent from these and shows a different possible solution.

    Regards,
    Tobias

    Thread Starter JVCode

    (@jvcode)

    Thanks for your response, this is all over my head and I’m not sure where to start, I may just need to create 26 tables, one for each letter. Trouble is, I need 3 of these A-Z tables which is 78 tables just for pagination lol! 🙁

    Thread Starter JVCode

    (@jvcode)

    I’m also looking to get rid of some of the white space between the table rows as shown in the pic here.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    no, don’t worry, this is not very difficult 🙂
    And you won’t have to to create 26 different tables, as the Row Filtering Extension does a perfect job in helping us out here.
    Let’s do it step by step:
    1. You have your big table.
    2. Add a new first column to that table.
    3. Click the checkbox below that new first column and click the “Selected columns: Hide” button. This will hide the column from the user, but allow us to insert information for the filtering.
    4. Now fill that new first column: In each cell, add the letter that this row belongs to (so, if the game is “BioShock Infinite”, you would enter a “B” in that row’s first column). This step is going to be the most tedious one.
    5. If you now view the table, nothing should have changed.
    6. Now install and activate the Row Filtering Extension from the link above (in case you haven’t yet).
    7. On the page with the table, now try changing the Shortcode to

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

    If you now view the table again, you should only see those rows that have an “A” in the hidden first column (i.e. where the game name starts with an “A”).
    This works in the same way for A-Z. With this, you have one big table, but with the Shortcode, you can create 26 different small tables.
    8. Now, we don’t want to create 26 pages or put 26 Shortcodes in these pages, so we’ll make this dynamic, so that the actual letter for which the table is filtered comes from the URL. For that, install and activate the second Extension that is mentioned above.
    9. Then change the table’s Shortcode to

    [table_filter id=123 filter_columns="1" /]

    Note the new Shortcode name and that the “filter” parameter is gone. That’s because the actual filter term will now be taken from a URL parameter:
    The full table will be accessible at
    http://example.com/your-page-with-the-table/
    while the URL
    http://example.com/your-page-with-the-table/?table_filter=A
    will only show the entries with “A”, and so on.
    10. Once you have that, you’ll just need to add links above the table to the URLS
    http://example.com/your-page-with-the-table/?table_filter=A
    http://example.com/your-page-with-the-table/?table_filter=B
    http://example.com/your-page-with-the-table/?table_filter=C
    and so on.

    About the spacing in the table: To fix that, I’d need to take a direct look at the page, to find out what code is necessary to change that. Could you please post a link?

    Regards,
    Tobias

    Thread Starter JVCode

    (@jvcode)

    http://xboxgamer.org/achievements/retail-achievements/ is the link to the table, I’ll try and go through the above steps later as it’s not working right now, most likely because I’m tired as hell lol. Thanks so much for your help and support!

    Thread Starter JVCode

    (@jvcode)

    Okay, I must be doing something wrong here, I’ve followed the above instrusctions, the table looks like this http://xboxgamer.org/Capture2.png But when I filter the results, it only grabs what’s in the letter cell and displays that colum, giving me the wrong results for chosen letter.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    from what I can see, you created a table with 26 rows, from A-Z. That’s not what I meant. The first column should basically just contain the first letter of the game name from the second column. So, “Bioshock Infinite” gets a B, “Dark Achievements” gets a D and so on.

    Regards,
    Tobias

    Thread Starter JVCode

    (@jvcode)

    I’ve tried it several different ways, and I’m just not able to get it to work successfully. (especially with the achievements and gamerscore columns to the right hand side) I must be doing something wrong somewhere. If when you have a few spare minutes, would you be able to show me a mock-up of your example? I’m just not getting it.

    Regards,

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    I’m confused. The Gamerscore and achievements columns have nothing to do with the filtering. There’s nothing to change there.
    For the filtering, please try again from a fresh start with my instructions above.

    Regards,
    Tobias

    Thread Starter JVCode

    (@jvcode)

    I finally get it haha, so very sorry for being a SLOW learner, I’m not sure it’s the work around you chose, but it works lol. I’m just now looking for a way to make the white space smaller, also the font changes when I input the short code :\

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    very nice! That’s great to hear! Looks very good!

    To fix the spacing, please add this to the “Custom CSS” textarea on the “Plugin Options” screen of TablePress:

    .tablepress-id-1 .column-1 img {
      margin-bottom: 0px;
    }

    About the font: You can influence that with

    .tablepress-id-1 th,
    .tablepress-id-1 td {
      font-size: 12px;
    }

    for example.

    Best wishes,
    Tobias

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

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

The topic ‘A-Z Pagination’ is closed to new replies.