Helpful Information
 
 
Category: vBulletin Article Depository
Collapse Tables by Default

Well, i just thought i would tell you all how to make things be collapsed by default because i didnt see anything relating to it on the forums.

In vB3, theres the handy feature to collapse items, but once your cookies are cleared, they are expanded by default again..well here is how to default it to collapsed

in your templates, find the tbody you require.. for example..


<tbody id="collapseobj_forumhome_XXXXXXXX" style="$vbcollapse[collapseobj_forumhome_XXXXXXXX]">


Change the style variable to display:none, so the example above would now read:


<tbody id="collapseobj_forumhome_XXXXXXXX" style="display:none">



And thats it, your table is now collapsed by default. Obviously you can expand it as usual. Hope you enjoyed this little tip and apologies if its already posted!

Thanks :) was playing with this today and it is cool :)
found the stuff also myself but forgot the
style="$vbcollapse[collapseobj_forumhome_XXXXXXXX] -> that is to make sure the cookie remembers it ;)

thanks to this thread i found out what i needed to do :)

Be careful with this - users with javascript disabled won't be able to expand the tables.

Is it possible to code it so that not all people have always to open all Categories? Now it is like u have to reopen all categories u want each time u visit "Forumhome"

Won't this also mean it's collapsed everytime you revisit, even if you left it open on your last visit ?










privacy (GDPR)