static pages and loader for chapter an static pages
This commit is contained in:
@@ -19,6 +19,14 @@ function jeemod_menu() {
|
||||
// 'access arguments' => array('use materio search api'),
|
||||
);
|
||||
|
||||
$items['jee/static'] = $base+array(
|
||||
'title' => 'jee',
|
||||
'page callback' => 'jeemod_static',
|
||||
// 'page arguments' => array(2),
|
||||
'access callback' => TRUE,
|
||||
// 'access arguments' => array('use materio search api'),
|
||||
);
|
||||
|
||||
return $items;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,29 @@ function jeemod_chapter($nid){
|
||||
"viewmode" => $viewmode
|
||||
);
|
||||
|
||||
if($nodeview = node_view(node_load($nid),$viewmode)){
|
||||
$rep = $rep+array(
|
||||
'node' => drupal_render($nodeview),
|
||||
);
|
||||
drupal_json_output($rep);
|
||||
}
|
||||
}
|
||||
|
||||
function jeemod_static(){
|
||||
$viewmode = "full";
|
||||
|
||||
|
||||
// get node by url
|
||||
$path = drupal_get_normal_path(preg_replace('/^\//', '', $_GET['href']));
|
||||
$nid = end(explode("/", $path));
|
||||
|
||||
$rep = array(
|
||||
// "get" => $_GET,
|
||||
// "path" => $path,
|
||||
"nid" => $nid,
|
||||
"viewmode" => $viewmode
|
||||
);
|
||||
|
||||
if($nodeview = node_view(node_load($nid),$viewmode)){
|
||||
$rep = $rep+array(
|
||||
'node' => drupal_render($nodeview),
|
||||
|
||||
Reference in New Issue
Block a user