为什么内容出现错位?

时间:2015-05-06 16:09:34

标签: drupal drupal-7 drupal-modules

我正在构建一个自定义模块,该模块应显示由第三方库创建的日历。到现在为止还挺好。唯一的问题是,日历显示在页面顶部,甚至在标题上方。它似乎与css无关。

这是它的样子: enter image description here

这是我的模块文件:

require_once 'includes/apphp-calendar/calendar.class.php';

function calendario_menu(){

  $items = array();

  $items['eventos/calendario'] = array( 
    'title' => 'Calendario', 
    'description' => 'Calendario de Eventos.',
    'page callback' => '_page_calendario',
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
  );

  return $items;
}


function _page_calendario() {
  $objCalendar = new Calendar();
  $calendar = $objCalendar->Show();

  return array(
    '#markup' => $calendar
  );
}

1 个答案:

答案 0 :(得分:3)

对我而言,就像日历类输出的#include <stdio.h> #define COUNT_OF(x) ((sizeof(x)/sizeof(0[x])) / ((size_t)(!(sizeof(x) % sizeof(0[x]))))) long int test(char array[16]) { return COUNT_OF(array); } void main(void) { char a[16]; printf("%ld\n", COUNT_OF(a)); // prints 16 printf("%ld\n", test(a)); // prints 8 or 4 for 64bit or 32bit systems } 函数而不是返回字符串一样 试试这个:

Show
相关问题