t('Weather'), ); return $blocks; } /** * Implements hook_block_view(). */ function mymodule_block_view($delta = '') { $block = array(); switch ($delta) { case 'weather': $path = drupal_get_path('module', 'mymodule'); $block['subject'] = t('Weater status'); $block['content'] = array( '#markup' => theme('weather_status'), '#attached' => array( 'js' => array( 'https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js', $path . '/mymodule.js', ), ), ); break; } return $block; } /** * Implements hook_theme(). */ function mymodule_theme() { return array( 'weather_status' => array( 'template' => 'weather-status', ), ); }