You are here

function l_ajax in Ajaxify Drupal with JQuery Ajax 7

Same name and namespace in other branches
  1. 6 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 119
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');
  }
  return theme('ajax_links_api_link', array(
    'title' => $title,
    'path' => url($path, array(
      'absolute' => TRUE,
    )),
    'target' => $target,
  ));
}