Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Meitar

    (@meitar)

    This is answered in the FAQ and many other places in this forum. The specific section you want to read begins:

    Some DataTables options need to be given JavaScript array literals[…]

    For more about DataTables’s options, refer to the DataTables support forum as is also stated on a sticky post in this forum.

    @joycedesignau

    I also had and still have problems in implementing codes found from datatables into shortcode of the plugin.

    For this I figure out you need to write

    “columnDefs”: [
    { “visible”: false, “targets”: 0 }
    ]

    into this

    [gdoc key="url" datatables_column_defs='%5B{ "visible": false, "targets":0}%5D']

    Here if you want to hide column 1 and 3 then set “target”: [0,2] and remember to replace [ with %5B and ] with %5D like this

    “targets”:%5B 0,2 %5D

    Those seem to be simple to the author and other IT guys but very difficult to the one like me. I am a physicsist and it took me few months to figure this translation.

    Hope this helps.

    Plugin Author Meitar

    (@meitar)

    @vihali Thanks so much for helping other users out.

    In your defense, the translation is not easy for many people and I know this. It was done this way in order to be programmtically simple, not easy to read. The true solution will come with a GUI overlay editor, which has been planned for many years but which never appeared because I simply cannot justify prioritizing it given how relatively little resources I’m given to develop this plugin. ¯\_(ツ)_/¯ Capitalism sucks.

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

The topic ‘datatables_column_defs’ is closed to new replies.