Closed (won't fix)
Project:
Views Accordion
Version:
6.x-1.4
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
12 Nov 2010 at 16:26 UTC
Updated:
15 Jul 2016 at 17:33 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
manuel garcia commentedWell, it depends on you definition of 'simple', if by simple you mean no custom coding, then no, there's no way, at least in d6. In D7 since we are using jquery ui's accordion, it should be possible, since it supports it. I havent tested it yet though.
As far as how to go about it with custom code, you would need to setup some kind of convention (perhaps using a hashtag), and then process that hashtag from the url using custom js to trigger the click event on the right row header.
I realy can't help out further than this, though if you give it a try and run into questions as to how to what to trigger the click event on, let me know.
Hope this helps =)
Comment #2
amalaer commentedIn D7 the following works for me:
nid)#at the beginning and unique id (in my casenid), cf. attached screenshotviews-accordion.jsmysite.com/accordion-page#case-studies-40) open the respective accordion item@Manuel: I would actually suggest to change the
elseinviews-accordion.jsto not touch links if they start with a#and overwrite them otherwise (like it is now). What do you think?Comment #3
manuel garcia commentedIt's an interesting idea, but we have to account for when people link on other hash links that are NOT accordion items, and this complicates things very much.
I would accept patches in this direction, but I can tell you right now it's not going to be an easy task, and it would have to be maintainable and very well tested.
I suggest you use the normal hashes for opening specific rows that the module provides.
Comment #4
amalaer commentedThanks for your feedback. I'll give it a try as soon as I have time.
I would if I could, but I don't see how I can achieve the following:
on several topic pages I have a view that shows the case studies (just links) related to that topic, the case study links link to the complete list of case studies on an accordion view page and open the corresponding item there. I must be able to generate the links on the related case studies view, that's why I use custom hashes.
Comment #5
Jonttue commentedIs there any progress on this feature? I am trying to do the same feature on D6, no luck so far.
Comment #6
amalaer commentedI haven't worked on it, but it's still on my todo list. However, I'll work on the D7 version first. Time permitting I'll look into the D6 version.
How critical/urgent is this feature for you?
Comment #7
Jonttue commentedIt's not critical but a nice to have feature I'd really like to get.
I almost found a way to do it with help of http://drupal.org/node/475552 . I inherited my own template for accordion as done in the example. The only problem left is to pass Node ID (nid) to the template with PHP. I have Node ID as excluded views field.. The example only provides id, for accordion row.
any ideas?
Comment #8
Jonttue commentedAnd just few minutes after I found the solution from the very same thread http://drupal.org/node/475552 .
Using first the template described in the #4 using "$view->result[$id]->nid" instead of "$id" in the line "
print 'A'. $id;" worked like a charm.The solution is done using hash making my url look like:
http://my.site/?q=jobs#job-15
Comment #9
amalaer commentedGood to hear that it worked using #475552: Ability to choose which accordion row is open by default, not just first.
I'll post updates on D7 as soon as I have something.
Comment #10
ilyasmdgh commented#2 was not working for me.
I have "Link this field to the original piece of content " selected.
Once unselecting that worked . Thanks amalear
Comment #11
ilyasmdgh commented#2 did work for me, but this does not seem to be working in chrome browser. Any thoughts
Comment #12
knalstaaf commentedI could pull it off with this script:
This is what the link on an (external) page looks like to load the accordion with the third tab open:
domain.com/about?opentab=2(<- zerobased)(Source)
Comment #13
cprofessionals commented#12 worked for me. I just put the above code in the footer of the view. THANKS!
Comment #14
manuel garcia commentedClosing now due to 6.x no longer supported.