• Resolved astar177

    (@astar177)


    Hi Tobias.

    I have been making lots of progress using Tablepress and so far am finding it a dream to use. You have done such a quality job. I cannot report one bug! ??

    Here is my latest question. I am about to batch import multiple XLSX files.

    For every one of these tables I want to “Show the table description above the table” and NOT ENABLE sorting of the table by visitor, the visitor to filter or search the table, pagination of the table or allow the visitor to change the number of rows shown or see the table information display.

    All of the above have to be manually changed because they are not – as you will know! – the default options.

    Is there a way I can do this on the batch import so I don’t have to go through each imported table later and change it?

    Thanks Tobias!!!

Viewing 1 replies (of 1 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    I see what you mean. For this, you could change the default definition of these options. For that, please add this to the end of your theme’s “functions.php” file:

    add_filter( 'tablepress_table_template', 'astar177_tablepress_datatables_defaults' );
    function astar177_tablepress_datatables_defaults( $table ) {
      $table['options']['use_datatables'] = false;
      $table['options']['print_description'] = true;
      $table['options']['print_description_position'] = above;
      return $table;
    }

    After adding this code, the default options will be changed for all newly added or newly imported tables. Already existing tables will remain unchanged.

    (The names of these options are defined here.)

    Regards,
    Tobias

Viewing 1 replies (of 1 total)
  • The topic ‘Batch XLSX import’ is closed to new replies.