Closed (won't fix)
Project:
Views Accordion
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Apr 2010 at 13:36 UTC
Updated:
15 Jul 2016 at 17:13 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Daniel A. Beilinson commentedSorry, i mean this div:
Comment #2
manuel garcia commentedThanks for the report Daniel, unfortunately this is a known issue...
Here is the situation:
The only ways around this is:
I feel this is not going to be a 10 minute fix. This will require time to experiment, research different options and well, probably several days of working and debugging. Views accordion has become very powerful, but also complex.
At the moment I don't have the time to put aside to work on this, but I am opened to suggestions, perhaps between all of us we can figure it out.
As a start in this direction, and for the time being, if you are not using the group field as the header, you can change your tpl (copy it to your theme dir), into this:
This will get the accordion stil working in the case of normal grouping, without using the group field as the header. You will have to fix the CSS though. Using the group field as the header will need much more work.
Note that I haven't fully tested that code, but well, looked ok at first glance.
I hope this triggers the discussion, and some of you help out on this issue. It's been lurking in the shadows for some time, it is time we face it!
Comment #3
manuel garcia commentedI think for the time being we'll have to live with how views does this. Perhaps in D7 we'll tackle this.
Comment #4
acouch commentedIn the views-view-accordion.tpl.php file there is an unused $id variable that will count each row of the view. That $id can be used for an even/odd class.
If you need a unique class for each row you could create a class out of the title "
print preg_replace('/[^a-z0-9]+/', '_', strtolower($title))" or use the title to look up the nid. Neither of those are great solutions but are good for a quick fix. Other than that I think you might have to create a row style in order to iterate through each row to add a unique identifier.Comment #5
luksakhi
why is this bug postponed? with this you cannot have multiple accordions on one page!
thanks
lukas
Comment #6
manuel garcia commentedelluca: Read the issue to answer your question.
Also, you can totaly have multiple accordions in one page.
Thanks
Comment #7
luksakwhat should answer my question?
i get ids like: views-accordion-field_slider_reference-default. and it is the same for every accordion group. i guess you use the id for the jQuery selector and by doing so, the accordion breaks. am i right?
thanks
Comment #8
manuel garcia commentedIt won't be tackled in d6 I'm sorry, however, this is fixed in D7. Feel free to test it out.
Comment #10
bdone commentedi've re-opened this, hoping the the maintainer will review.
included is a patch for the 6.x-1.4 version that adds support for multiple accordions.
it address the third bullet point of comment #2 above by providing a unique #id for each accordion group.
in our use case, we were trying to embed accordions within another view. but, only the first accordion was working correctly.
maybe this is helpful for someone still grappling with the d6 version and multiple accordions.
Comment #11
bdone commentednew at submitting patches...is it appropriate to change the version here?
Comment #12
luksakthank you bdone
i have fixed this as well on my install but in a quite ugly way. i will try your patch the next time i update my modules.
lukas
Comment #13
knalstaaf commentedWould there be a D7 patch available? -> #1344676: Adding a unique class when using a grouping field
Comment #14
knalstaaf commentedComment #15
jendlerons commentedHere's the patch I've employed. It's a similar idea to comment #10.
Comment #16
manuel garcia commentedYou are not using this var anywhere?
This patch needs heavy testing in different setups.
Comment #17
jendlerons commented$vars['views_accordion_id']is used in the tpl.However, you're right. Devs should definitely test this before using in production.
Edit:
If you do test, please post the results in this thread!
Comment #18
john.money commented+1 #15.
Tested Firefox, Chrome, Opera, IE9-- all work and gets rid of invalid HTML errors.
Comment #19
mpv commented+1 #10 (didn't tested #15).
Tested on firefox 12.0, chrome 19, IE 7 and IE 8.
Comment #20
manuel garcia commented6.x no longer supported.