Hi,
need to group fields within a views rows. Thought easyly to use the CCK fieldgroup - but I can't include created fieldgroups in my view as they are not displayed.
Is this a bug? Is it possible to integrated?? Is there an other way to group fields within a views rows???

Regards
vistree

Comments

merlinofchaos’s picture

Project: Views (for Drupal 7) » Content Construction Kit (CCK)
Component: node data » Views Integration

If you only read one of these submission guidelines, read this one. (Then please read the rest) If your problem deals exclusively with fields or filters provided by another module (CCK, Image, VotingAPI are common) please post the issue under the queue for that module first; all modules are responsible for telling Views about their own fields. It's possible Views IS at fault, but the module maintainers are the best people to make that determination, and they can kick the issue into the Views queue with an explanation of what's wrong if that is the case.

Someday, people will read the above text and understand it.

vistree’s picture

Thank 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

merlinofchaos’s picture

On 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.

yched’s picture

Category: task » feature

Fieldgroups 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...

yched’s picture

Title: CCK fieldgroup not as content field » CCK fieldgroup as a Views 'field'

better title

vistree’s picture

Hmm, 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

yched’s picture

Theming 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'

karens’s picture

One 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.

yched’s picture

Sure, 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 :-)

andrew.eatherington@gmail.com’s picture

It would be good to have the facility to group fields in views though? (not necessarily dependant on the module supplying the data)

markus_petrux’s picture

Category: feature » support
Status: Active » Fixed

Aha! 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.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

mrP’s picture

Title: CCK fieldgroup as a Views 'field' » field_group as a Views 'field'
Project: Content Construction Kit (CCK) » Field Group
Version: 6.x-2.x-dev » 7.x-1.1
Component: Views Integration » Code
Status: Closed (fixed) » Active
mrP’s picture

Title: field_group as a Views 'field' » CCK fieldgroup as a Views 'field'
Project: Field Group » Content Construction Kit (CCK)
Version: 7.x-1.1 » 6.x-2.x-dev
Component: Code » Views Integration
Status: Active » Closed (fixed)

...sorry didn't mean to move this one.