Closed (fixed)
Project:
Content Construction Kit (CCK)
Version:
6.x-2.x-dev
Component:
Usability
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Aug 2009 at 21:39 UTC
Updated:
5 Nov 2009 at 16:20 UTC
Hi,
I've searched all over for this, but I'm sure it must be answered elsewhere.
I used the biblio module for my library but want to change to cck. It's easy to do everything, except add multiple authors in one text box.
Ideally i'd like to have multiple authors like this:
Lastname1, Firstname1; Lastname2, Firstname2; Lastname3, Firstname3
And then be able to play with those values in Views.
Is there any way of doing this with CCK?
Thanks,
James
Comments
Comment #1
markus_petrux commentedIf you want to play with author names separatelly, then you need to store them in separate fields, I think.
Maybe you could use a text field configured to allow multiple values, or maybe you could use a freetagging widget from content taxonomy module. If you want to display the names separated by semi-colons, then you need to override theme functions or templates. Install the advanced_help module or look at the CCK handbook for hints on how to format fields.
Comment #2
halfiranian commentedThanks Markus,
I've managed to store them as separate values in the same textfield (by allowing multiple values), but the problem is when combining with Views.
There is a problem formatting the fields.
I can either format the multiple ones, through theme_content_view_multiple_field or format the whole row, through a views template.
What I want to do though, is have each value as its own link (which then goes to an author argument), whether in a multiple value textfield or if there's only one value.
Have I lost you?
Anyway, at line 253 in content_handler_field_multiple.inc there's a line that says:
// TODO: could we use generic field display ?
which suggests maybe this isn't possible yet...
Cheers
Comment #3
markus_petrux commentedNot exactly. I think you could implement a field formatter that tells CCK to manage multiple values (*). Then you can select this formatter from the field options form in views, and that's it, I think.
See the CCK Formatters module. There is a formatter here for Text fields that manages multiple values and lists the values using a comma separated list. If it doesn't work for you as-is, then you may want to create your own.
Comment #4
halfiranian commentedThanks markus, I modified a CCK Formatter module and now I have the result I need!
Thanks
Comment #6
federico commentedI need the same, I installed the CCK Formatters module, but links are still to "multiple authors" and not to "individual authors" (my case is different, but similar to your example).
Could you tell us what did you modify? Thanks in advance.