angular-drupal icon indicating copy to clipboard operation
angular-drupal copied to clipboard

Pls Add sort & direction additional parameters

Open JayKandari opened this issue 9 years ago • 1 comments

Hi Tyler, Grt Job with this module. I myself learned a lot. I was trying to node_index(query) from drupal when I discovered the code doesn't have sort & direction parameter in "drupal_entity_index_build_query_string()" if you can see that in 7.x version. Thanks. !!

Attached is a screenshot of Drupal Services Entity module with its additional parameters.

This will make query builder complete. :) Thanks screenshot-www drupal org 2016-02-10 16-24-52

JayKandari avatar Feb 10 '16 11:02 JayKandari

@JayKandari Hello, thank you for the kind words. We actually don't use the Services Entity module, but this functionality is now baked into the Services module. See this fixed issue for an explanation of how to use sorts: https://www.drupal.org/node/2537968

This feature needs to be now baked into Angular Drupal. I've implemented this feature in jDrupal here: https://github.com/easystreet3/jDrupal/blob/7.x-1.x/src/services/services.entity.js#L225

So ideally Angular Drupal would be expanded to have a similar entity_index function like jDrupal. That code would go here: https://github.com/easystreet3/angular-drupal/blob/7.x-1.x/src/angular-drupal.js#L465

And that function would be intelligent enough to assemble the proper query string. I'm gladly accepting pull requests on this one.

signalpoint avatar Feb 10 '16 13:02 signalpoint