Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Views Bootstrap 5.5.4 — Minor update available for module views_bootstrap (5.5.4). Release: Rightup theme 1.0.3 — Minor update available for theme vartheme_bs5_rightup (1.0.3). Release: CommentOn 1.0.6 — Minor update available for module commenton (1.0.6). Release: ChatGPT Ads 1.0.3 — Minor update available for module chatgpt_ads (1.0.3). Release: Opensolr Search 5.1.3 — Minor update available for module opensolr_search (5.1.3). Release: ServiceM8 Webform Integration 1.2.1 — Minor update available for module servicem8_webform (1.2.1). Release: PostfixAdmin 1.0.0 — Initial release available for module postfix_admin (1.0.0)! Release: ip_analyser 1.0.3 — Minor update available for module ip_analyser (1.0.3). Module Revived: Swagger-PHP OpenAPI 3 documentation generator 1.0.0 — Module swagger_php updated after 10 months of inactivity (1.0.0). Security Coverage: Microsoft Azure AI — Module ai_provider_azure now has official Drupal security advisory coverage.

jDrupal

Security covered Drupal 9–11
View on drupal.org

What is jDrupal?

A JavaScript Library and API for Drupal REST.

What is jDrupal used for?

Drupal Application Development.

What kind of apps?

A variety of application architectures, including...

  • Mobile Applications (Android, iOS, etc)
  • Web Applications
  • Headless Drupal / Decoupled Drupal
  • PhoneGap (Cordova)
  • Drupal Frontend

Drupal REST Tools

  • Connect
  • User Login / Logout & Account Load
  • Create, Retrieve, Update & Delete Nodes
  • Views Integration

jDrupal...

  • solves many common development needs for Drupal based applications.
  • provides a familiar Drupal coding experience and syntax for developers.
  • runs alongside any frontend client side framework, or with no framework at all.
  • utilizes JavaScript prototypes and promises.

Since jDrupal has no dependencies and is written in pure JavaScript, it can be used in a wide variety of architectures and frameworks. Just include it in the <head> of your app's index.html file:

<html>
  <head>
    <!-- ... -->
    <script src="jdrupal.min.js"></script>
    <!-- ... -->
  </head>
  <body><!-- ... --></body>
</html>

Quick Examples

See more examples

// Connect to Drupal and say hello to the current user.
jDrupal.connect().then(function() {
  var user = jDrupal.currentUser();
  var msg = user.isAuthenticated() ?
    'Hello ' + user.getAccountName() : 'Hello World';
  alert(msg);
});
// Load a node and display the title.
jDrupal.nodeLoad(123).then(function(node) {
  alert(node.getTitle());
});
// Login and show the user their id.
jDrupal.userLogin('bob', 'secret').then(function() {
  alert(jDrupal.currentUser().id());
});
// Get results from a view and print the node ids to the console.
jDrupal.viewsLoad('my-view-url').then(function(view) {
  var results = view.getResults();
  for (var i = 0; i < results.length; i ++) {
    var node = new jDrupal.Node(results[i]);
    console.log('node id: ' + node.id());
  }
});

Drupal Render Element

Learn more about jDrupal on the Drupal front end

$element = array(
  '#markup' => '<div id="msg">Loading...</div>',
  '#attached' => array(
    'library' => array(
      'jdrupal/jdrupal',
      'example/app'
    )
  )
);

Drupal 7

jDrupal doesn't need its own module in D7, instead refer to the jDrupal 7 docs for more info.

JavaScript Library

https://github.com/signalpoint/jDrupal

Getting Started

jDrupal is best friends with DrupalGap, the open source application development kit for Drupal websites.

Depends on

Dependencies of the latest stable release

  • node Drupal core
  • rest Drupal core
  • restui Drupal core
  • serialization Drupal core
  • user Drupal core
  • views Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Apr 2024
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Dormant

Releases

Version Type Core Release date
8.x-1.5 Stable 9–11 Sep 20, 2024
8.x-1.4 Stable Apr 24, 2024