blocks

doublejosh's picture

Move core block settings across to a new theme

  1. # Reset blocks to remove standard placements.
  2.  
  3. UPDATE block SET status = 0, region = -1 WHERE theme = 'OLD-THEME';
  4.  
  5. # Pull data across.
  6.  
  7. UPDATE block AS export_blocks
  8. INNER JOIN block AS import

Fix for Display block on specific node type, and set current node ID as view argument for node reference.

  1. <?php  
  2. // Make sure this is a block version of the view, and the current page is a node
  3. if ($view->build_type == 'block' && arg(0) == 'node' && is_numeric(arg(1))) {
  4.        
  5.         // load node info to deter

block logic not working

  1. <?php
  2. if ($block->region == 'navigation' || 'sections'):
  3.  echo render($content);
  4. elseif ($block->region == 'left' || 'right'):
  5. ?>
  6. <div class="frameWrapper clearfix">
  7.     <div class="frameTop c

Zen edit_links_array as an array of arguments to pass to l()

  1.   // Display 'edit block' for custom blocks.
  2.   if ($block->module == 'block') {
  3.     $edit_link['title'] = t('edit block');

Code

  1. /**
  2.  * Implementation of hook_theme_registry_alter().
  3.  *
  4.  * Make simpleblocks' block preprocess function run *after* everything else's,

Amorfati's page.tpl.php

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

Fix for Display block on specific node type, and set current node ID as view argument for node reference.

  1. <?php  
  2. // Make sure this is a block version of the view, and the current page is a node
  3. if ($view->build_type == 'block' && arg(0) == 'node' && is_numeric(arg(1))) {
  4.        

Fix for Display block on specific node type, and set current node ID as view argument for node reference.

  1. <?php  
  2. // Make sure this is a block version of the view, and the current page is a node
  3. if ($view->build_type == 'block' && arg(0) == 'node' && is_numeric(arg(1))) {
  4.        

Display block on specific node type, and set current node ID as view argument for node reference.

  1. <?php  
  2. // Make sure this is a block version of the view, and the current page is a node
  3. if ($view->build_type == 'block' && arg(0) == 'node' && is_numeric(arg(1))) {
  4.        
Syndicate content