|
@@ -9,9 +9,30 @@ function materio_didactique_permission() {
|
|
|
'title' => t('view materio didactique home block'),
|
|
|
'description' => t(''),
|
|
|
),
|
|
|
+ 'access materio didactique page' => array(
|
|
|
+ 'title' => t('access materio didactique page'),
|
|
|
+ 'description' => t(''),
|
|
|
+ ),
|
|
|
);
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * Implements hook_menu().
|
|
|
+ */
|
|
|
+function materio_didactique_menu() {
|
|
|
+
|
|
|
+ $items['whoweare'] = array(
|
|
|
+ 'title' => 'Who we are',
|
|
|
+ 'page callback' => 'materio_didactique_get_page',
|
|
|
+ // 'page arguments' => array(),
|
|
|
+ 'access arguments' => array('access materio didactique page'),
|
|
|
+ 'type' => MENU_CALLBACK,
|
|
|
+ 'file' => 'materio_didactique.pages.inc',
|
|
|
+ );
|
|
|
+
|
|
|
+ return $items;
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* Implements hook_block_info().
|
|
|
*/
|
|
@@ -65,6 +86,11 @@ function materio_didactique_theme($existing, $type, $theme, $path) {
|
|
|
'template' => 'materio-didactique-home-block',
|
|
|
'path' => drupal_get_path('module', 'materio_didactique').'/templates',
|
|
|
),
|
|
|
+ 'materio_didactique_page' => array(
|
|
|
+ 'arguments' => array('items'=>array()),
|
|
|
+ 'template' => 'materio-didactique-page',
|
|
|
+ 'path' => drupal_get_path('module', 'materio_didactique').'/templates',
|
|
|
+ )
|
|
|
);
|
|
|
}
|
|
|
|
|
@@ -78,6 +104,14 @@ function template_preprocess_materio_didactique_home_block(&$vars){
|
|
|
$items[] = node_load($nid);
|
|
|
}
|
|
|
$vars['items'] = $items;
|
|
|
-
|
|
|
}
|
|
|
|
|
|
+function template_preprocess_materio_didactique_page(&$vars){
|
|
|
+ // dsm($vars, 'template_preprocess_materio_didactique_page | $vars');
|
|
|
+
|
|
|
+ $items = array();
|
|
|
+ foreach ($vars['items'] as $nid => $item) {
|
|
|
+ $items[] = node_load($nid);
|
|
|
+ }
|
|
|
+ $vars['items'] = $items;
|
|
|
+}
|