You are here

function nd_content_build_modes in Display Suite 6.3

Implementation of hook_content_build_modes().

File

modules/nd/nd.module, line 57
Node displays.

Code

function nd_content_build_modes() {
  $build_modes = array(
    'nd' => array(
      'title' => t('Node displays'),
      'build modes' => array(
        'full' => array(
          'title' => t('Full node'),
          'weight' => -1,
        ),
        'teaser' => array(
          'title' => t('Teaser'),
          'weight' => 1,
        ),
        'sticky' => array(
          'title' => t('Sticky'),
          'weight' => 2,
          'views style' => TRUE,
        ),
        NODE_BUILD_RSS => array(
          'title' => t('RSS'),
          'weight' => 3,
        ),
      ),
    ),
  );

  // Also add this here, so other modules (like views_attach)
  // can profit from custom build modes from the UI.
  $db_build_modes = variable_get('nd_build_modes', array());
  foreach ($db_build_modes as $key => $build_mode) {
    $build_modes[$key] = array(
      'title' => $build_mode,
      'build modes' => array(
        $key => array(
          'title' => $build_mode,
          'views style' => TRUE,
        ),
      ),
    );
  }
  return $build_modes;
}