Commit f66869d3 authored by Mindiell's avatar Mindiell

First commit

parents
; $Id$
name = "More nodes"
description = Complete a list of (the latest) nodes
core = 6.x
package = "La Quadrature"
$('a.more-nodes').click(function(){
$elem = $(this).parent().parent().find('div.last-actu div.item-list ul');
var from = $elem.find('li').size();
var type = $(this).attr('data-type');
var dossier = "-";
var url = '/more-nodes/' + from + '/' + type + '/' + dossier;
$.getJSON(url, function(json){
$elem.append(json.content);
});
return false;
});
<?php
function lqdn_more_nodes_menu() {
//$items['more-nodes/%from/%type/%dossier'] = array(
$items['more-nodes/%/%/%'] = array(
'title' => 'More content',
'page callback' => '_lqdn_more_nodes_content',
'page arguments' => array(1, 2, 3),
'access arguments' => array('access content'),
'type' => MENU_CALLBACK,
);
return $items;
}
function _lqdn_more_nodes_content($_from, $_type, $_dossier = NULL)
{
print drupal_json(array(
'content' => '<li>' . implode('</li><li>',
lqdn_latest_nodes_list_items($_type, NULL, 3, $_from)) . '</li>',
));
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment