setAttribute for a 'multiple select' checkbox
Permalink
Hi there, I'm back in the realm of fiddling with page attributes and setting them programmatically...
I know how to change a page attribute for a checkbox by using:
where $variable is 1 or 0... but how do I do the same for a 'dropdown select' where 'multiple values' are checkboxes?
Also, while I'm here, it would be handy to know how to change a page attribute which is a normal 'dropdown select' (as I can see that one cropping up later on)
If you can give me a pointer, I'd be very grateful
Thanks
I know how to change a page attribute for a checkbox by using:
$c->setAttribute('attribute_handle', $variable);
Also, while I'm here, it would be handy to know how to change a page attribute which is a normal 'dropdown select' (as I can see that one cropping up later on)
If you can give me a pointer, I'd be very grateful
Thanks
Thanks dude, I didn't want to hassle you again after helping with the last one... Once I get these last bits working, I'll drop you a link to show you it all working... I'm rather pleased with it all so far :)
Although, I might be back later to ask another question about this if you don't mind...
Thanks again
Rob
Although, I might be back later to ask another question about this if you don't mind...
Thanks again
Rob
Ask away, that's what the community is for :)
For single select dropdowns you can set it just like the other attribute, but you need to make sure that the value you are setting exactly matches one in the select list (case sensitive).