Quote by Blaine: I've seen nuke themes that have a small icon on each block title that allowed you to collapse a block as well.
I've actually thought about doing this, but it doesn't seem possible with the current core. Each block on the site needs to have a unique id if you want cookies to be able to remember which blocks are open and which are closed. I don't see much point in collapsable blocks if you have to collapse them each time you load a page.
Correct me if I'm wrong, but it seems as though the only variable that gets passed into the block theme files is the block_title. So, that's all we have to work with.
Ok, so maybe we can assume that the title is unique. But, how do we get it into a javascript variable? That's where I'm stumped. If the title has either a single or double quote inside of it, the Javascript flatout breaks.
The way I see it, there are two ways to patch the core to allow this functionality:
1) Set the unique block_name variable in the themefiles (I'm assuming quotes can't be in that variable, but I haven't tested to see if GL allows it). This seems to be the correct fix for this particular problem.
2) Allow for escaping of geeklog variables so that they can be used in javascript. For example, [x_js] could be the javascript-escaped version of the [x] variable. I could see this being quite useful for other applications if it were done automatically for every theme variable.
So, that 's what has been running through my head this week. Do you see anything that I'm missing? Any ideas that might work?