• Resolved tmz1001

    (@tmz1001)


    Hello, first of all, thanks for the great plugin.

    I would like to ask that if the plugin is able to pass the parameter and show the row data after the user on clicks the links.

    For example, if I click on the link FileName_123 it will jump to a new page that gets the parameter automatically and shows the data records. Let say the 123 is in the column named ID.

    In detail, let say if the on click link has append on the table, for example, FilenameFileName_456
    FilenameFileName_789
    FilenameFileName_012

    So every time user on clicks, it will pass the parameter to show the records, let say ID 456, which will show records for 456 data. Let say ID 789, will show records for 789 data.

    Thanks in advance.

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.
    Also, sorry for the late reply. I was very busy with personal life, so that I could not reply earlier.

    I see what you mean, but unfortunately, I’m not aware of an automatic or directly usable solution for something like this 🙁

    Regards,
    Tobias

    Thread Starter tmz1001

    (@tmz1001)

    Hi thanks for the reply, a very simple example scenario is like, can user global search in the URL instead of predefined the value in the shortcode? https://www.example.com/?table_filter=myfilterword

    Let say, https://www.example.com/?table_filter=apple and it will display content with the keyword apple.

    https://www.example.com/?table_filter=pineapple and it will display content with the keyword pineapple.

    Let say, apple and pineapple is under column FRUITS, which user can global filter directly from URL

    • This reply was modified 4 years, 5 months ago by tmz1001.
    • This reply was modified 4 years, 5 months ago by tmz1001.
    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    that’s possible with the TablePress Extension from https://tablepress.org/extensions/shortcode-filter-get-parameter/

    Regards,
    Tobias

    Thread Starter tmz1001

    (@tmz1001)

    Yes it works, great thanks! it is supposed apply this shortcode [table_filter id=123 /] instead of [table id=123 filter=”myfilterword” /]. I have tested it and now can global search the URL.

    I have another question is why the content rows doesn’t show after i filter=123RA_rowsdata.xlsx

    • This reply was modified 4 years, 5 months ago by tmz1001.
    • This reply was modified 4 years, 5 months ago by tmz1001.
    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    that’s because the Extension filters out the _ by default. To change that, please change line 23 of the file tablepress-shortcode-filter-get-parameter.php from

    $filter_term = preg_replace( '#[^a-z0-9 ]#i', '', $filter_term );
    

    to

    $filter_term = preg_replace( '#[^a-z0-9_ ]#i', '', $filter_term );
    

    Regards,
    Tobias

    Thread Starter tmz1001

    (@tmz1001)

    Very nice! Much appreciate for the replied

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

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

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

The topic ‘Passing parameter based on click link’ is closed to new replies.