Skip to content
This repository was archived by the owner on Mar 3, 2025. It is now read-only.

How to create box blocks for an OS App

baisong edited this page Aug 9, 2012 · 1 revision

In Drupal 7

  1. Go to Structure > Blocks and then + Add box
  2. Choose a short, descriptive Box description, and matching Machine name
  3. Enter any content and Save

Alternative: OS Widgets

If you have a View block display in your view, you may include the block as a widget on the Control Panel Layout page with the following code in your feature's module file, after the features.inc include_once statement:

/**
 * hook os_widget
 * 
 * Exposes blocks as OpenScholar widgets.
 */
function myfeature_os_widget(){
  $items = array();
  
  $items['views-myfeature-block'] = array(
      'module' => 'views', 
      'delta' => 'myfeature-block', 
      'region' => 'sidebar_second', 
      'weight' => '-10',
      'info' => 'MyFeature Block'
  );
  
  return $items;
}

Clone this wiki locally