Is it possible to put in the body of the accordion (maybe in the header or the footer of the view) an additional link / button with the correct css class code to close the current accordion (it could be useful if you re-themize the accordion and make it wider, as wide as the main container of your theme)?
Do you think it will work?
Comments
Comment #1
manuel garcia commentedYou could use the open all / close all button perhaps, but I dont think this is what you want.
You could definetly do it with some custom jquery triggered when you click on the link you want though, that should work. Of course you'd need to:
1. Print the link somehow (in the tpl or so).
2. Know enough js/jquery to trigger the right event on click.
Comment #2
ilgriso commentedYes, thanx, it's what I did.
If someone is interested in, I modified the file views-view-accordion.tpl.php at row #27 :
and views-accordion.js from row #27 an addtional link to close the accordion:
Comment #3
manuel garcia commentedYou should really move that to your own js file, if you want to avoid problems when upgrading the module, standard practice. Only difference would be that you'd need to select the appropriate element to slideup etc yourself.
Comment #4
manuel garcia commentedClosing now due to 6.x no longer supported.