Skip to content

Instantly share code, notes, and snippets.

View woeldiche's full-sized avatar

Jesper Wøldiche woeldiche

  • Clearhaus A/S & Unzer
  • Aarhus, Denmark
  • X @woeldiche
View GitHub Profile
@woeldiche
woeldiche / template.php
Created November 28, 2012 10:23
Add classes to fields in egedal theme
<?php
/**
* Implements template_preprocess_field().
*
* Adds classes to field based on field name.
*
* Good options are:
* - Field name: $vars['element']['#field_name'].
* - Content type: $vars['element']['#bundle'].
@woeldiche
woeldiche / template.php
Created September 23, 2011 10:01
Move fields til other regions
<?php
/**
* Implements hook_page_alter().
* Moves field_title_image from node to 'featured' region.
* Moves secondary content from node (downloads, links) to 'sidebar-two' region.
*/
function pufdk_page_alter(&$page) {
// Declare variables
$image = array();
$secondary_content = array();