template

call template file, pass variables

  1. <?php
  2.  
  3. $text = theme('apply_template', $data);
  4. return $text;
  5.  
  6. function theme_apply_template($data) {
  7.     ob_start();
  8.     include path_to_theme().'/my-block.tpl.php';

custom node template

  1.  <div class="content">
  2.         <?php print content_format('field_buildings_img', $field_buildings_img[0]); ?>
  3.         <?php print check_markup($node->content['body']['#value']) ?>
  4.        

Individual menu classes on theme

  1. /*******individual menu classes******/
  2. function phptemplate_menu_item($mid, $children = '', $leaf = TRUE, $extraclass = '') {

objectx.org template

  1. <?php
  2.  
  3. //var_dump(menu_tree_all_data('secondary-links'));
  4.  
  5. /*
  6. if($array)
  7. {
  8.     foreach ($array as $key => $link)
  9.  

Add next link to node

  1. <?php
  2. function next_node_link($type, $object, $teaser = FALSE) {
  3.   $links = array();
  4.  
  5.   if ($type == 'node' && isset($object->nid)) {
  6.     if (!$teaser) {

LOLtemplate page.lol

  1. <title>HAI!1! VISIBLE $head_title!1! KTHXBYE!!!</title>
  2. HAI!!!
  3. VISIBLE $head
  4. VISIBLE $styles
  5. VISIBLE $scripts
  6. KTHXBYE!??
  7. </head><body>
  8.        
  9. <div id="page">
  10. <div id="header">
  11. HAI

forum-list.tpl.php

  1. <?php
  2. // $Id: forum-list.tpl.php,v 1.4 2007/08/30 18:58:12 goba Exp $
  3.  
  4. /**
  5.  * @file forum-list.tpl.php
  6.  * Default theme implementation to display a list of forums and containers.
  7.  *
  8.  
Syndicate content