taxonomy

Looking to move the field_tags out of $content and into the header area. How can I do that?

  1. <div id="postDateArea"><?php print $date; ?></div>
  2. <article<?php print $attributes; ?>>
  3.  
  4.   <!-- Header Area -->
  5.   <?php if (!$page && $title): ?>
  6.   <header>
  7.    
  8.     <!-- Title and Comment Coun

how to put a term description in the header if you don't have the termid in the url

  1. <?php
  2. $view = views_get_current_view();
  3. if($view->result[0]) {
  4.         $tid = (int)($view->result[0]->term_data_tid);
  5.    $term = taxonomy_get_term($tid);
  6.    print (filter_xss_admin($term->description));

return all taxo terms for a given nid

  1. <?php
  2.   return db_result(db_query("SELECT GROUP_CONCAT(name SEPARATOR '+') FROM {term_data} td INNER JOIN {term_node} tn ON (tn.tid = td.tid) WHERE nid=%d", arg(1)));
  3. ?>

Fix for Get Taxonomy for page and display in page.tpl.php

  1. <?php
  2.        
  3.         $taxonomy_terms = $node->taxonomy;
  4.         foreach ($taxonomy_terms as $term) {
  5.             if ($term->vid == 1) {
  6.                         if ($term->tid == 10) {
  7.                                 $catname = $title;
  8.                         }
  9.                         else {
  10.                                 $catname = $

why don't I get a term name?

  1.   <?php
  2.         $vid = 1;
  3.         $termid = (int)arg(1);
  4.         $tree = taxonomy_get_tree($vid, $parent = 0, $depth = -1, $max_depth = NULL);
  5.         ?>
  6.         <h1><?php print t('Products of ').$tree[$termid]->name; ?></h1>

Preprocessor Get Taxonomy

  1.         function MYTHEME_preprocess_page(&$variables, $hook) {
  2.                 if ($hook == 'node' || $hook == 'page') {
  3.  
  4.                         if (is_object($variables['node'])) {
  5.  
  6.                                 // get the taxonomy term to put in the content he

Get Taxonomy for page and display in page.tpl.php

  1. <?php
  2.        
  3.         $taxonomy_terms = $node->taxonomy;
  4.         foreach ($taxonomy_terms as $term) {
  5.             if ($term->vid == 1) {
  6.                         if ($term->tid == 10) {
  7.                                 $catname = $title;
  8.                         }
  9.                         else {
  10.                                 $catname = $

Fix for Remove 'Vocabularies' fieldset

  1. /**
  2.  * Implementation of hook_form_alter().
  3.  */
  4. function mymodule_form_alter(&$form, &$form_state, $form_id) {
  5.   if ($form_id == 'mobileapp_node_form') {
  6.     // Remove 'Vocabularies' fieldset.
  7.  

output of print_r(field_info_instances('node', 'foto'));

  1. Array
  2. (
  3.     [field_image] => Array
  4.         (
  5.             [label] => Afbeelding
  6.             [widget] => Array
  7.                 (
  8.                     [weight] => -3
  9.                     [type] =>

Fix for Remove 'Vocabularies' fieldset

  1. /**
  2.  * Implementation of hook_form_alter().
  3.  */
  4. function mymodule_form_alter(&$form, &$form_state, $form_id) {
  5.   if ($form_id == 'edit-title') {
  6.     // Remove 'Vocabularies' fieldset.
  7.     $form[
Syndicate content