Customize REST AJAX URL with data other than ID

Customize REST AJAX URL with data other than ID

LesserDJHLesserDJH Posts: 7Questions: 4Answers: 2

Currently, it's a simple matter to customize DataTables for a RESTful interface, using ROW_ID.

ajax: { create: { type: 'PUT', url: 'blah/blah/blah/_id_' }, edit: { type: 'PUT', url: 'blah/blah/blah/_id_' }, remove: { type: 'DELETE', url: 'blah/blah/blah/_id_' } }

So you get something like 'blah/blah/blah/ROW_98' as the URL.

Is there a way that I can write the URL using data from the table? So the URL would render as something like "blah/blah/blah/thisisthenameofthepageforthisrowofdata' (without ROW_ prepended).

Answers

  • LesserDJHLesserDJH Posts: 7Questions: 4Answers: 2

    Nevermind, found it! For anyone trying to do something similar, use idSrc.

This discussion has been closed.