Closed (duplicate)
Project:
Content Taxonomy
Version:
6.x-1.0-rc2
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
18 Sep 2009 at 14:42 UTC
Updated:
27 Mar 2010 at 21:10 UTC
I suppose this is a rather trivial issue, but I just have no idea on how to deal with it.
I am using content taxonomy terms to build a task list with views, and one of them accepts multiple values. Is there a way to get those terms in order to display them inline?
This is the code I am using right now (be gentle on me, it's my first attempt at dealing with php...) :
<li>
<ul>
<div style="margin-bottom: -0.7em;"><?php print $fields['title']->content ?></div>
<span style="color : #777777; font-size: 80%; margin: 0;">
<?php
print $fields['last_updated']->label;
print $fields['last_updated']->content;
?><br />
</span>
<span style="color : #777777; font-size: 80%; margin: 0;">
<?php
print $fields['field_assignat_value']->label;
print $fields['field_assignat_value']->content;
?>
</span>
</ul>
</li>
But unfortunately it produces a different div for each term, so they are displayed on different lines (see attached image).
Do feel free to comment on any part of the code.
| Comment | File | Size | Author |
|---|---|---|---|
| Taxonomy_tultiple_terms.jpg | 3.16 KB | castawaybcn |
Comments
Comment #1
castawaybcn commentedI found a way of doing this through the CCk Formatters module http://drupal.org/project/cck_formatters, I also downloaded additional formatters from http://drupal.org/node/331700#comment-1179255
Suggestions on how to improve this solution are most welcome!
Comment #2
xjmHere's a patch to display the terms in a comma-separated list: #749432: comma separated, ordered list and unordered list. Marking this as duplicate of that.
The CCK Formatters solution is also fine.