You are here

README.txt in Ajaxify Drupal with JQuery Ajax 6

Same filename and directory in other branches
  1. 8 README.txt
  2. 7 README.txt
Before you start (Important) :
--------------------------------------------------------------------------------

Open the page.tpl.php file for your theme, and search for 
$content.The $content should be surrounded by a div with an class 
(or id).If no div add the div yourself.

Example : <div class="#content"><?php print $content; ?></div>
In above case, enter "#content" in module config page.

How to use Ajax links API
--------------------------------------------------------------------------------

METHOD 1 : In module config page, specify the Classes/Ids to trigger Ajax. 
Target DIV will be default CSS selector defined, you can change default CSS 
Selector from module config page.

Example : 
<div class="tabs"><a href="node/add/page">Add page</a></div> . You can ajaxify 
this link by adding .tabs a in module config page.



METHOD 2 : in your tpl , <?php l_ajax($title, $path, $target) ?>

* $title: Title.
* $path : Drupal path.
* $target (optional): ID/CLASS of DIV to be replaced. This will override 
Default CSS Selector defined in module config page.

Example :
<?php l_ajax("add page", "node/add/page", "#content") ?>



METHOD 3 : Add class="ajax-link" to any link. Target div will be default CSS 
selector defined . You can change default CSS Selector from module config page 
or override target by specifying rel="".

Example : 
<a class="ajax-link" href="node/add/page" rel="#content">Add page</a>


Developer Notes
--------------------------------------------------------------------------------
Override tpl : 
Developer can add/remove any variables by copying page-ajax.tpl.php to their 
theme. All variables available to page.tpl.php can be used. 
In case you want to override page-ajax.tpl.php, for eg: for path /node/add, you 
can create page-node-add-ajax.tpl.php.

Upgrade : 
You can upgrade/degrade module anytime by simply overwriting whole folder.


DEMO
--------------------------------------------------------------------------------
Goto YOUR_SITE/ajax-links-api/test

File

README.txt
View source
  1. Before you start (Important) :
  2. --------------------------------------------------------------------------------
  3. Open the page.tpl.php file for your theme, and search for
  4. $content.The $content should be surrounded by a div with an class
  5. (or id).If no div add the div yourself.
  6. Example :
  7. In above case, enter "#content" in module config page.
  8. How to use Ajax links API
  9. --------------------------------------------------------------------------------
  10. METHOD 1 : In module config page, specify the Classes/Ids to trigger Ajax.
  11. Target DIV will be default CSS selector defined, you can change default CSS
  12. Selector from module config page.
  13. Example :
  14. . You can ajaxify
  15. this link by adding .tabs a in module config page.
  16. METHOD 2 : in your tpl ,
  17. * $title: Title.
  18. * $path : Drupal path.
  19. * $target (optional): ID/CLASS of DIV to be replaced. This will override
  20. Default CSS Selector defined in module config page.
  21. Example :
  22. METHOD 3 : Add class="ajax-link" to any link. Target div will be default CSS
  23. selector defined . You can change default CSS Selector from module config page
  24. or override target by specifying rel="".
  25. Example :
  26. Add page
  27. Developer Notes
  28. --------------------------------------------------------------------------------
  29. Override tpl :
  30. Developer can add/remove any variables by copying page-ajax.tpl.php to their
  31. theme. All variables available to page.tpl.php can be used.
  32. In case you want to override page-ajax.tpl.php, for eg: for path /node/add, you
  33. can create page-node-add-ajax.tpl.php.
  34. Upgrade :
  35. You can upgrade/degrade module anytime by simply overwriting whole folder.
  36. DEMO
  37. --------------------------------------------------------------------------------
  38. Goto YOUR_SITE/ajax-links-api/test