1. Home
  2. Docs
  3. Index
  4. Data Publisher
  5. Setup and use the Data Publisher

Setup and use the Data Publisher

Setup the Data Publisher

  • Make sure the jQuery DataTables and jQuery DataTables Responsive libraries are loaded (Manage Plugin > Data Publisher Settings)
  • Grant access to tables you want to show on your web pages (Manage Plugin > Front-end Settings)
  • You can give non admin users access to the Data Publisher as well (Manage Plugin > Data Publisher Settings)
  • Use shortcode ‘wpdataaccess’ to add your publication to a web page (How to use shortcode ‘wpdataaccess’)

Create a publication

  • Navigate to: WP Data Access > Data Publisher
  • Select a database table (make sure you have granted access)
  • Select columns to be displayed or * to see all (use the select button to select available columns)
  • Select desired output (flat or responsive)
  • Select desired options for responsive output
  • Save publication
  • Test publication

Publish a publication

  • Copy your shortcode (click Show shortcode button)
  • Paste your shortcode into your post or page
  • Publish and test your post or page

 

Was this article helpful to you? Yes No

3 Replies to “Setup and use the Data Publisher

  1. I believe the WP Data Access plugin will enable me to achieve my requirements, but I have come up against a couple of issues. The data that I wish to display contains records of vehicle details, but some information is repeated so that I have included that in child tables. For example, the vehicle records include more than 100 vehicles, but there are only 4 different types of engine. Thus I have an “engine” field in the vehicles table, which equates to the “id” field in the engines table.

    In a Data Project, I can define the relationships, but I’m afraid the documentation doesn’t explain clearly to me how I can display the engine details in the vehicle row. The project appears in my WP dashboard, and I can see the data from the vehicles table. I have not yet found the documentation on how to publish the data from the project on a page which will be displayed in the browser.

    I have also looked at the Data Publisher. Here I can display the vehicle data table on a page, and click on the button to open a popup (or tooltip) that displays the full data record for one individual vehicle. This is precisely what I want – and something that I have not so far found in any other WP plugin. So thank you for that – it saves me some coding in PHP if I were to write my own code. But, the problem here is that I cannot see how to incorporate the child data – the engine data in my example.

    The data is all historical, and I have exported and imported the data from the previous version of the website, so the data tables are all setup and populated in WP. There will be no new data, so I don’t need to provide for data entry – so no need for user admin, etc. I just want to display the complete vehicle record with the associated data – the engine, as mentioned above – plus a couple of other features.

    Can you advise me? Thanks in advance for your help.

  2. Hi Nigel,

    If you don’t need to edit your table data, you don’t need the Data Projects tool. The main purpose of the Data Projects tool is data management. If you only need to query your data you are better of with the Data Publisher.

    To use the Data Publisher however, you need to set one additional step. While the Data Projects tool supports parent-child relations, the Data Publisher only supports straight tables. So I see your problem. The solution to solve this problem however is very simple. You just need to write a query that joins your tables correctly and then create a view for that query. Within the Data Publisher you can use a view just as you would use a table.

    I hope this helps. Let me know if I have not been clear enough or you need help otherwise.

    Best regards,
    Peter

  3. Hello Peter,

    Thanks for your prompt and helpful response.

    I created the view in phpMyAdmin, and this works exactly as I require with the Data Publisher in your plugin. The records in my view have an ID field which I use to define the initial ordering of the records. As far as I can see, I need to include and display this ID field to ensure this sorting works as intended?

    One other minor question: can I change the title on the popup/tooltip with the details, so that it displays something more specific than “Row details”?

    Thanks again for your help.

    Best regards,

    Nigel

Leave a Reply

Your email address will not be published. Required fields are marked *