Closed (fixed)
Project:
Chaos Tool Suite (ctools)
Version:
6.x-1.3
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Feb 2010 at 04:50 UTC
Updated:
19 Jul 2010 at 22:10 UTC
File: plugins/content_types/term_context/term_list.inc
Function: ctools_term_list_content_type_render()
theme_item_list() uses the array keys to determine when to add the classes 'first' & 'last'. Since the $items passed are using the term id as keys, the class attributes are being applied incorrectly. You could override the theme function to fix, but doesn't seem like these keys are being used.
Example:
Array
(
[5] => Term1 <-- this doesn't get the class 'first'
[10] => Term2
[4] => Term3
[9] => Term4
[3] => Term5
[6] => Term6 <-- this gets the class 'last'
[8] => Term7
)
Line 54:
$items[$related->tid] = l($related->name, taxonomy_term_path($related), array('rel' => 'tag', 'title' => strip_tags($related->description)));
Fix (remove key):
$items[] = l($related->name, taxonomy_term_path($related), array('rel' => 'tag', 'title' => strip_tags($related->description)));
Comments
Comment #1
merlinofchaos commentedSilly theme('item_list') making assumptions about keys.