Okay
  Public Ticket #3103170
Desired feature
Closed

Comments

  •  1
    Michael started the conversation

    Hi

    I am looking for a feature that uses shortcode switches to select what parameters to display on different pages using the same table.

    I have a table where the rows follow a timeline (dates and week numbers) and five of the columns refer to different items (housings), A, B, C, D and E. On the website there will be one page with one table with ALL the information on display. But there will also be five individual pages that details each of the housings. On each of those pages I need to display only the table columns relevant for that item. 

    In my mind I imagine a shortcode would look something like this:

    Basic page - [wpdatatable id=1]
    Page about A [wpdatatable id=1 viewcolumns="A"]
    Page about B [wpdatatable id=1 viewcolumns="B"] etc and possibly
    Page about items C, D and E [wpdatatable id=1 viewcolumns="C, D, E"]

    (Also the reverse might come in handy:
    Page about C and E [wpdatatable id=1 excludecolumns="A, B, D"])

    One basic assumption is that the columns relevant for using such a shortcode switch must have an optional attribute that could be set using the quickaccess tool. Now there is only an option to either display or hide a column, but I would like an extra option to make visibility togglable via a shortcode switch.

    Of course it would also be possible to explicitally specify each of the columns, but if the number of columns is large that could be cumbersome.

    This way a table can be "striped" to display different views, different columns, of the complete data matrix.

    IS there already some way of doing this?

    Otherwise, is that a feature worth the effort to develop?

    Best regards

    Michael



  •  1,851
    Miloš replied


    Hi, Michael 

    Sorry for the delay

    - At this time, we don't have  a solution for what you described, to make a toggle through the shortcode, or to have variable columns display through the shortcode- but i have to say i like this idea, it is worth to make a suggestion to our developers.

    They are not yet working on something like that, but we can suggest it for them.

    Please feel free to search on our suggestions page

     to see if someone may be already suggested this feature. If you can't see it, feel free to add your suggestion there,  and as more people vote, the feature will move higher on the priority list.

    You can certainly follow our changeLog page if you'd like ( it is also available in the plugin dashboard), where we state any changes/new features/bug fixes during updates;

    and our newsletter, so you're informed about new features, bug fixes, freebies, etc.

    -

    At this moment, we only have this way to create tables with different columns showing on them.

    We don't have a built-in solution for this (yet); our developers with be working on adding it in the future, but i can't say an ETA on it, though.

    At this moment, unfortunately, we can't create a solution as intended, in terms of one dynamic table having columns that can hide or show.

    - The solution we can suggest for this functionality, is creating multiple tables on multiple pages.

    You can have one main "source table" that holds all the data and columns. 

    It could be a Manual type, or SQL based (has to be created in the database),   

    and then create separate tables from it by an SQL Query, each query can pull only the columns you need.

    It is easy to find the table name for an SQL Query, for example, if you have a Manual table, you can go to the Edit tab -  and you will see what SQL table name you need.

    5755294439.png


    Then each SQL version of the table will have a different shortcode.

    ;

    - Additionally, if you need to limit access to certain pages and tables only for users with certain roles,

     since wpDataTables can't do that, you can install a membership plugin, and set up which user roles are restricted/allowed to view certain pages.

    So, for example, if table 1 is for the Subscriber role, limit that page just for them, a second table just for editors, and so on; depending on what you need to achieve, which you can set up with a membership plugin.

    - I hope that helps.

    Let me know how that seems. Thank you.


    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables