Default blocks?
highvoltage - August 8, 2009 - 03:23
| Project: | Block Reference |
| Version: | 6.x-1.9 |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
Is it possible to set a default so that a predetermined block will appear on all nodes with that field, or must the block be set only on a per node basis at creation?

#1
Yes, just edit the field settings, there is a 'default value' fieldset there. You can't really do it the first time you configure the field, but if you re-edit it, you can.
#2
Ok, thank you. ^_^
I'll have great use for this module then.
#3
#4
Automatically closed -- issue fixed for 2 weeks with no activity.
#5
I had a follow-up question for this issue...
using the drag-drop list widget, I would like to set multiple defaults using php (since the default "default widget" is a drop-down--not allowing multiples). following the help on the field, I tried:
return array(0 => array('bid' => 5),
1 => array('bid' => 7)
);
But, while there does appear to be an additional select widget (3 instead of the usual 2), it still lists all of the blockreferences as
<none>. Any ideas?Thanks. -derrick.
#6
I would just make a module and use hook_form_FORM-ID_alter to set the defaults when the node edit/add page is loaded.
#7
as far as I can tell you've done the right thing with your code, as long as 5 and 7 are the correct values
#8
#9
Automatically closed -- issue fixed for 2 weeks with no activity.