Closed (fixed)
Project:
Content Construction Kit (CCK)
Version:
6.x-2.x-dev
Component:
Views Integration
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
15 Aug 2008 at 10:54 UTC
Updated:
15 Jan 2012 at 20:02 UTC
Comments
Comment #1
merlinofchaos commentedSomeday, people will read the above text and understand it.
Comment #2
vistree commentedThank you for the nice hint ;-)
And as I allready posted an equal question to the CCK-issue-tracker (without any reply) I thought that maybe the views board is the correct one for asking.
Okay, so I understand, that my question hat little to do with views and a lot with CCK.
What about the second part of my post: is there an alternative to group fields within views2?
Regards
vistree
Comment #3
merlinofchaos commentedOn question 2, I dunno. The way Views works, modules provide their information to Views and Views lets you build queries with it. I often don't have good knowledge of exactly what these modules provide.
Comment #4
yched commentedFieldgroups are not actual pieces of data, and as such, they are currently not available as Views 'fields'.
I guess you could wish to be able to add a fieldgroup as a shortcut for all the individual fields that compose it.
Such a Views 'field' would need a settings form that is the aggregate of all the settings forms of the fields in the group. Heavy...
Comment #5
yched commentedbetter title
Comment #6
vistree commentedHmm, not sure if I understand you right ...
What I need is the possibility to group fields. Why? I have to create a view where all fields are organized in 3 columns per row (e.g. 3 fields left, 2 in the middle and 4 in the right column). As fields can have multiple values and different height it is not possible to reach this format with only using CSS. I need a "surrounding" DIV around the fields of each column. This is what the CCK fieldgroup offers - a surrounding DIV.
So, I thought, it would be possible to use this CCK "fieldtyp" - but if this is to heavy, maybe there is an other way to put fields in a shared DIV??
Regards
vistree
Comment #7
yched commentedTheming you view lets you structure the markup whatever way you want.
Views comes with extensive help pages if you get the 'advanced_help' module.
See about 'views theming'
Comment #8
karens commentedOne option for the setting would be to provide only a context rather than a setting for each individual field in the group. So you could ask for the group's 'page' view and you will get the fields with the format they selected for 'page'. This would keep it simpler than letting you set each individual field.
The main advantages of providing this would be to have a single field that automatically contains all the fields in a group instead of needing to select each one individually, and possibly to have a Views 'field' that is formatted exactly the same as the group is formatted.
I don't have time to work on this now, but I thought I'd drop in that suggestion.
Comment #9
yched commentedSure, that's probably the right idea.
We'll especially need fieldgroups as Views 'fields' if the work on the combo-field takes the 'fieldgroup' road :-)
Comment #10
andrew.eatherington@gmail.com commentedIt would be good to have the facility to group fields in views though? (not necessarily dependant on the module supplying the data)
Comment #11
markus_petrux commentedAha! Let me switch the issue type as a support request, because you can get it right now.
Ok, so please open fieldgroup.module and find function fieldgroup_view_group(). You can use this function from a Views field that allows you to write custom PHP code, such as:
http://drupal.org/project/views_customfield
There's an example on how to use fieldgroup_view_group() in file content_fieldgroup.inc located in cck/modules/fieldgroup/panels/content_types.
Comment #13
mrP commentedFor D7, see #1346644: Re-use field group on views fields.
Comment #14
mrP commented...sorry didn't mean to move this one.