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?



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.


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

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


if ($exposed):

print $exposed;


if ($attachment_before):

print $attachment_before;


if ($rows):

print $rows;

elseif ($empty):

print $empty;


if ($pager):
print $pager;

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.

tonystar’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?