I've got Gworks up and running nicely, but I would like to know how to change the number of buttons that appear across the top? But default there are 6: how do I change to have 7, or 8?
Is it something to do with table widths?
I've got Gworks up and running nicely, but I would like to know how to change the number of buttons that appear across the top? But default there are 6: how do I change to have 7, or 8?
Is it something to do with table widths?
Comments
Comment #1
nedjoI've hard-coded the number of buttons because the button display uses a background image (the button) that should have a width that is a fixed fraction of the total table width. In other words, if there were too many buttons, the bar would be too wide. Preferably, there would be narrower images when using more buttons (though this would also mean less space for the text, so term names would have to be shorter).
If you wish to make the change anyway, edit taxonomy_context.module as follows:
function taxonomy_context_settings(), add the following line:function taxonomy_context_get_buttons(), find the following line (near the end):and edit to read
Comment #2
nedjoThat second change to the code should have been:
Comment #3
nedjo... should have been:
Comment #4
joel_guesclin commentedStrangely, I found that when I did this the code to input the variables worked fine (and I could see the variable when I looked in MySQL), but when I tried to change the condition in taxonomy_context_get_buttons, all I got was a blank page. Much frustration, went back and messed about a bit and finally discovered that this worked:
a) before the loop in taxonomy_context_get_buttons put:
b) Replace this:
with this
It works! Except that now I have to find the place where I actually define the width of the buttons in the first place, which I presume is somewhere in the Theme?
One day, I really must learn to program in PHP... instead of just banging things to see what happens
Comment #5
nedjoNo longer relevant, as we've removed buttons.