Hello i was wondering how one would go about adding the accordian style to blocks in a sidebar.

I presume i have to make a tpl file up just for a sidebar and then add the accordian classes to .....errrr i dunno.

Could anyone point me in the right directon?

Thanks

Comments

fadgadget’s picture

So ive created a tpl for my block view and i now 'control it'. Ive added the code like so. It seems to be working ok but its showing 'open' as default. Maybe its becuase ive just overidden one block.

<div class="<?php print $classes; 

">


print render($title_prefix);
if ($title):
print $title;
endif;

print render($title_suffix);
if ($header):
print $header;

endif;

if ($exposed):

print $exposed;

endif;

if ($attachment_before):

print $attachment_before;

endif;

if ($rows):

print $rows;

elseif ($empty):

print $empty;

endif;

if ($pager):
print $pager;
endif;
?>

fadgadget’s picture

mmm that never worked. Here is my block tpl with the accordian stuff added abut it. I did half random where i placed the code so theres a lot of room for me to be wrong.
http://pastebin.com/WWK71C69

anydigital’s picture

Do you still need any help with accordion? If so - could you please clarify - do you want to place all blocks in the sidebar to the accordion? Or something else?