function ajax_links_api_preprocess_page in Ajaxify Drupal with JQuery Ajax 6
Same name and namespace in other branches
- 7 ajax_links_api.module \ajax_links_api_preprocess_page()
Implements hook_preprocess_page().
File
- ./
ajax_links_api.module, line 125 - Make any links or create new links to load content to particular DIV via jQuery Ajax.
Code
function ajax_links_api_preprocess_page(&$vars) {
// This is used to display only $content.
if (isset($_GET['ajax']) && $_GET['ajax'] == 1) {
$vars['template_files'][] = 'page-ajax';
foreach ($vars['template_files'] as $suggestion) {
$vars['template_files'][] = $suggestion . '-ajax';
}
array_pop($vars['template_files']);
}
}