Closed (fixed)
Project:
Content Construction Kit (CCK)
Version:
6.x-2.6
Component:
General
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
31 Mar 2010 at 17:04 UTC
Updated:
26 Mar 2011 at 08:53 UTC
Hi,
I'm implementing CCK taxonomy fields to add terms as tags to my content, But it displaying in following manner:
Tags: XYZ
ABC
QWR
etc
I want them to display as
Tags: XYZ , ABC, QWR etc
or
Tags: XYZ | ABC | QWR
Any help?
Comments
Comment #1
Rameez commentedWhy nobody replying? please reply if anyone know the answer. Thank you
Comment #2
Junro commentedDamm I want this code!
I can have XYZ, ABC, QWR, THY, ASE but if The field have only one value, I have XYZ,,,, lol
It looks like simple but when you're not an expert in php...
Comment #3
Junro commentedEasy:
See http://drupal.org/node/155361
Comment #4
Junro commentedErf this is not good if we have only one value... $puntuacion is still displaying.
Comment #5
Junro commentedSorry, the code is perfect :)
Comment #6
Rameez commentedHI,
Thanks a lot for help, but can you please tell me where to put this code?
I tried to replace it in content-field-tpl.php, but didn't worked for me. Please explain bit in detail?
Comment #7
Junro commentedUse the Content template module.
It's very easy to use when you have a little knowledge in php.
Comment #8
Rameez commentedHi,
Thanks, I manage to display tags with the following code in node.tpl.php
But the issue is output displaying as follows:
Tags:
xyz1, xyz2, xyz3,,,,
How can i avoid 3 extra commas to get print in last? and is it possible to print "Tags:" Inline? ..Thanks
Comment #9
Rameez commentedOOps i don't know what was the reason of printing of those extra commas in the end, but its been resolve now.
Finally i ended up with following code:
Thanks for the help.
Comment #10
Junro commentedOOps i don't know what was the reason of printing of those extra commas in the end, but its been resolve now.
It's because you have to edit and save again all nodes :)
Comment #12
allella commentedCalling count($node->field_tags) inside of the foreach loop will execute a count() each iteration. The previous examples show how you can call count() just one time before the foreach loop, which would be more efficient.
Comment #13
neelamssantosh commentedi need the input as 3
label: label: label
text-field: text-field: text-field:
can anyone help me,its urgent