home | career | drupal | java | mac | mysql | perl | php | scala | uml | unix

Drupal example source code file (pathauto.js)

This example Drupal source code file (pathauto.js) is included in the DevDaily.com "Drupal Source Code Warehouse" project. The intent of this project is to help you "Learn Drupal by Example".

PHP - Drupal tags/keywords

alias, attach, automatic, context, else, form-item-path-alias, form-item-path-pathauto, function, if, jquery, path, php, return, var

The pathauto.js Drupal example source code

// $Id: pathauto.js,v 1.9 2010/11/11 17:34:54 davereid Exp $
(function ($) {

Drupal.behaviors.pathFieldsetSummaries = {
  attach: function (context) {
    $('fieldset.path-form', context).drupalSetSummary(function (context) {
      var path = $('.form-item-path-alias input').val();
      var automatic = $('.form-item-path-pathauto input').attr('checked');

      if (automatic) {
        return Drupal.t('Automatic alias');
      }
      if (path) {
        return Drupal.t('Alias: @alias', { '@alias': path });
      }
      else {
        return Drupal.t('No alias');
      }
    });
  }
};

})(jQuery);

Other Drupal examples (source code examples)

Here is a short list of links related to this Drupal pathauto.js source code file:

new blog posts

"Drupal" is a registered trademark of Dries Buytaert.

my drupal tutorials and examples  

Copyright 1998-2016 Alvin Alexander, alvinalexander.com
All Rights Reserved.

Beginning in 2016, a portion of the proceeds from pages under the '/drupal-code-examples/' URI will be donated to charity.