Closed (works as designed)
Project:
PHPTemplate
Version:
master
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
7 Dec 2004 at 15:18 UTC
Updated:
26 Mar 2005 at 18:51 UTC
Jump to comment: Most recent file
Comments
Comment #1
(not verified) commentedAn example of use with box_grey theme: http://drupal.org/node/14029
Comment #2
grohk commentedI have applied this patch to the latest CVS phptemplate.engine and have attached a fresh copy of the patch.
I am testing this version of this patch on our website http://code0range.net
Is there any possibility that this could make it into the main phptemplate.engine or would that be a bad idea?
Comment #3
adrian commentedYou can use an additional template.php file on a per template basis to include this functionality using :
[php
function _phptemplate_variables($hook, $vars) {
if ($hook == 'node') {
if (module_exist("taxonomy_image")) {
foreach (taxonomy_node_get_terms($node->nid) as $term) {
$vars['taxonomy_images'][] = taxonomy_image_display($term->tid, "alt='$term->name'");
}
}
}
}
?]
Comment #4
grohk commentedMade some small changes to the above code to make it work with the help of Adrian via #drupal-support IRC:
I am changing this to "by design" since this patch is not needed. The correct way to call the new variables in node.tpl.php is:
print $taxonomy_images[0]Once I get this working really well I will add this to the documentation for the taxonomy_images module and the handbook.