Project:Block reference
Version:6.x-1.9
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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?

Comments

#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

Status:active» fixed

#4

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

#5

Status:closed (fixed)» active

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

Status:active» fixed

#9

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here