Hi,
I am using CCK 6.x-3.x-dev and Views 6.x-2.8 and I am trying to show CCK Multigroup content correctly in Views. Currently, when a user types in content
Group 1
Label A: Text 1A
Label B: Text 1B
Group 2
Label A: Text 2A
Label B: Text 2B
Views generates:
Label A: Text 1A Text 2A
Label B: Text 1B Text 2B
Correct display should be:
Label A: Text 1A
Label B: Text 1B
Label A: Text 2A
Label B: Text 2B
How do I achieve that? I see that there are _delta fields and "Content multigroup" filter in Vews but have no idea what they do. I also saw a thread that seems to have the answer for me http://drupal.org/node/416154 but it was posted since March 2009 and very confusing...Can someone please help?
Many thanks!!
BB
Comments
Comment #1
blueblade CreditAttribution: blueblade commentedsomeone please help?
Comment #2
blueblade CreditAttribution: blueblade commentedanyone?
Comment #3
stefan81 CreditAttribution: stefan81 commentedlooking forward to an update on this too
Comment #4
markus_petrux CreditAttribution: markus_petrux commentedThe filter under the "Content multigroup" group in Views UI is aimed to allow you to sync the delta values of fields in a multigroup. Though, if you mix non-multigroup and multigroup fields, you'll get duplicate rows, just like when you mix multiple value fields. The multigroup does not have a grouping checkbox. Instead, I think you may try using Views Custom Field module, with some PHP code you can render a multigroup. See fieldgroup_view_group() function in fieldgroup.module.
Comment #5
blueblade CreditAttribution: blueblade commentedmarkus_petrux,
Thanks for your reply. I appreciate your help but I still dont understand how to get this done...do you know if there's any step by step tutorial/forum thread that may help? Thanks again.
BB
Comment #6
funkytraffic CreditAttribution: funkytraffic commentedOne possible solution is:
Comment #8
stefan81 CreditAttribution: stefan81 commentedhi blueblade, which solution did work out for you?
Comment #9
blueblade CreditAttribution: blueblade commentedI gave it up completely - not using multigroup at all.
Instead, I created new a content type to collect information I originally wanted to have in multigroup, then use Views to add links to those content once users submit their information. These links show up on where multigroup information was originally supposed to be instead, which means to view the info details, you will have to click on those links and navigate to a new page. In multigroup, you can limit how many repeats for the multigroups, for this, I use Node Limit Number module instead to set a limit to how many times each user can create that new content type.
By doing it this way I can actually get the users to submit even more information since I can add as many cck fields to the new content type, everything is more flexible too.
Hope this help.
Comment #10
t0b1 CreditAttribution: t0b1 commentedPerhaps this view-code will help you or someone else
i'ts from my upcoming label page.
i have this content-types:
RELEASE
- nid
- title
- multigroup "tracks"
- - Pos
- - NodeReference->Tracks
TRACKS
- nid
- titel
- audio
- further info
So one Release can have unlimited Tracks:
e.g.
Release: a very cool cd
consists of:
Pos | Track
A1 | Song
A2 | Song Remix
B1 | Lalala
B2 | Cool Music
i like to have a view called from a panel via argument "nid"
it works fine with this view now .... after many many ...many tries ;)
Comment #11
butler360 CreditAttribution: butler360 commentedSo is this just never going to happen or are there plans for it?
Comment #12
tomgf CreditAttribution: tomgf commentedI am using a dirty hack to show this in the way I like.
The method consist of two parts:
The template.php function
In this function we combine the fields in different elements of the multigroup into one pipe separated value.
The views-view-fields--myview.tpl.php code
Here we receive the output of the previous function, transform it into an array and operate with it.
I know that this is probably the dirtiest hack ever… but so far, it seems to be working. Also, by writing this I recognize several ways of improving this code. Maybe I'll do it and post an update.
Comment #13
joomlerrostov CreditAttribution: joomlerrostov commentedSubscribing.
Is there any way to solve an issue: show in Views 3 dev multigroup fields separately ?
For now i able to show only all multifroup, the struscture is follows:
bmw - yellow
audi - black
audi - green
but i want to have handler to separate values, for example to show only second value from group (audi - black) + filter to select values by first and second - select from multigroup only audi cars with colors,
or only choosen color cars
please point me on the solution
Comment #14
thedavidmeister CreditAttribution: thedavidmeister commentedfunkytraffic, this helped me out a great deal!
thanks for drawing my attention to Views Custom Field, this is an arbitrarily powerful module for displaying data just the way that you want.
exactly what you need to get Multigroup playing nicely with views.
Comment #15
kbk CreditAttribution: kbk commentedThe Multigroup Views Filter feature wasn't working for me until I downgraded to PHP 5.2 (from PHP 5.3). It is now working fabulously.
For newbs, your PHP version information is available at /admin/reports/status .
Comment #16
KarenS CreditAttribution: KarenS commentedThe original support request was answered. This issue is veering off into other questions/issues.
Comment #18
arkjoseph CreditAttribution: arkjoseph commentedJust wanted to chime in with the solution to show multi group values along with any other values in a node with out the duplication of non-multi group values.
Do the following:
all the fields in the multigroup need the box checked: Group multiple values
'Distinct' under basic settings, enable 'Distinct' .
Easiest way to see your results is in a table view.
Thats it!
Comment #19
matteblacke CreditAttribution: matteblacke commentedI've just had a massive problem which has been fixed by NOT following arkjoseph. (sorry)
Do NOT Group Multiple Values for any fields
AND Do NOT select Distinct.
Have JUST multigroup fields under 'Fields'
Select the Content multigroup: content under 'FIlters'
Then select your arguments (Node ID etc)
Style: Table also looks good.
Hope this helps
Comment #20
fanculo CreditAttribution: fanculo commentedTried this way with latest cck dev, and got a:
Fatal error: Call to undefined method stdClass::join() in /var/www/drupal/sites/all/modules/views/includes/query.inc on line 926
Comment #22
Majdi CreditAttribution: Majdi commented#18 arkjoseph Thanks a lot
It works perfect
Comment #23
tommer CreditAttribution: tommer commented#19 matteblacke's method also work - thanks :)
Comment #24
TeamCthulhu CreditAttribution: TeamCthulhu commented#19 matteblack's method also has the added bonus of printing each value in the multigroup on a separate row in a table (allowing striped even/odd rows), and sorting the multigroup by one of its fields. Sweet.
Comment #25
TommyK CreditAttribution: TommyK commented#19 in combination with views_field_view works great!