You are here

function l_ajax in Ajaxify Drupal with JQuery Ajax 6

Same name and namespace in other branches
  1. 7 ajax_links_api.module \l_ajax()

Ajax links API.

Parameters

string $title: Title to display.

string $path: Drupal path eg: user/login.

string $target: ID or CLASS of DIV to be replaced. eg: #content-content or .content.

Return value

string a link with class ajax_link and rel=$target.

1 call to l_ajax()
ajax_links_api_test in ./ajax_links_api.module
Callback - ajax-links-api/test.

File

./ajax_links_api.module, line 104
Make any links or create new links to load content to particular DIV via jQuery Ajax.

Code

function l_ajax($title, $path, $target = NULL) {
  if ($target == NULL) {
    $target = variable_get('ajax_links_api_selector', '#content');
  }
  $path = url($path, array(
    'absolute' => TRUE,
  ));
  return theme('ajax_links_api_link', $title, $path, $target);
}