You are here

function ajax_links_api_help in Ajaxify Drupal with JQuery Ajax 7

Same name and namespace in other branches
  1. 8 ajax_links_api.module \ajax_links_api_help()
  2. 6 ajax_links_api.module \ajax_links_api_help()

Implements hook_help().

File

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

Code

function ajax_links_api_help($path, $arg) {
  if ($path == 'ajax-links-api/test' || $path == 'admin/config/development/ajax-links-api' || $path == 'admin/help#ajax_links_api') {
    $output = t('<h2><strong>How to use Ajax links API</strong></h2>

	<p><strong>Method 1</strong> : You can ajaxify any links by specifying the Class/Id in <a href="@admin">Module settings page</a>.
	Target DIV will be default Target DIV defined in module config page.</p>
	<p>Example : <code>@example1</code> . You can ajaxify this link by adding
	<code>.test</code> in module config page.</p>

	<p><strong>Method 2</strong> : Use this in your tpl => <code>echo l_ajax($title, $path, $target)</code></p>
	<p>* <code>$title</code>: Title to display.<br />
	* <code>$path</code> : Drupal path. <br />
	* <code>$target (optional)</code>: ID or CLASS of DIV to be replaced. You can override default Target DIV defined by specifying <code>$target</code>.</p>
	<p>Example : <code>l_ajax("Add Page","node/add/page","#content")</code>.</p>

	<p><strong>Method 3</strong> : Add <code>class="ajax-link"</code> to any link. Target div will be Target DIV defined . You can change default Target DIV or override target by specifying <code>rel=""</code>.</p>
	<p>Example : <code>@example2</code></p>

	<h2><a href="@demo">DEMO</a></h2>', array(
      '@admin' => url('admin/config/development/ajax-links-api'),
      '@example1' => '<a class="test" href="node/add/page">Add page</a>',
      '@example2' => '<a class="ajax-link" href="node/add/page" rel="#content">Add page</a>',
      '@demo' => url('ajax-links-api/test'),
    ));
  }
  return isset($output) ? $output : NULL;
}