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
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

danielb - August 8, 2009 - 23:28

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

highvoltage - August 9, 2009 - 00:14

Ok, thank you. ^_^

I'll have great use for this module then.

#3

danielb - August 9, 2009 - 01:40
Status:active» fixed

#4

System Message - August 23, 2009 - 01:50
Status:fixed» closed

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

#5

dellis - February 18, 2010 - 18:07
Status:closed» 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

danielb - February 18, 2010 - 22:56

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

danielb - February 18, 2010 - 23:14

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

danielb - February 23, 2010 - 23:22
Status:active» fixed

#9

System Message - March 9, 2010 - 23:30
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.