Showing posts with label cck theme. Show all posts
Showing posts with label cck theme. Show all posts

Wednesday, February 29, 2012

Free Drupal CCK & Views Video Chapters

ADDING A CCK FIELD


THE VIEWS USER INTERFACE

Tuesday, January 31, 2012

Structure of the .info file in drupal theme


Contents

Drupal understands the keys listed below. Drupal will use default values for the optional keys not present in the .info file. See the examples set for core themes.
  • name required
    • name = A fantasy name
  • description recommended
    • description = Tableless multi-column theme designed for blogs.
  • screenshot
    • screenshot = screenshot.png
  • version discouraged
    • version = 2.0
  • core required
    • core = 6.x
  • engine required in most cases
    • engine = phptemplate
  • base theme
    • base theme = your theme name
  • regions
    • regions[left] = Left sidebar
    • regions[right] = Right sidebar
    • regions[content] = Content
    • regions[header] = Header
    • regions[footer] = Footer
  • Drupal 7 default regions:
    regions[header] = Header
    regions[highlighted] = Highlighted
    regions[help] = Help
    regions[content] = Content
    regions[sidebar_first] = Left sidebar
    regions[sidebar_second] = Right sidebar
    regions[footer] = Footer
  • features
    • features[] = logo
      features[] = name
      features[] = slogan
      features[] = mission
      features[] = node_user_picture
      features[] = comment_user_picture
      features[] = search
      features[] = favicon
      ; These last two disabled by redefining the
      ; above defaults with only the needed features.
      ; features[] = primary_links
      ; features[] = secondary_links

    • Drupal 7 features
      features[] = logo
      features[] = name
      features[] = slogan
      features[] = node_user_picture
      features[] = comment_user_picture
      features[] = favicon
      features[] = main_menu
      features[] = secondary_menu
         
    •    
  • stylesheets
    • stylesheets[all][] = theStyle.css
  • scripts
    • scripts[] = myscript.js
  • php

Tuesday, September 20, 2011

Create region in node.tpl.php (drupal 6)


1.Add code in yourtheme.info

regions[region_name] =  Region Name


2.Add funciton in template.php


function THEME_NAME_preprocess_node(&$variables, $hook) {
  $variables['
region_name'] = theme('blocks', 'region_name');
}



3.Add code in node.tpl.php



<?php if ($region_name) { ?><div class="region_name"><?php print $region_name?></div><?php }; ?>