I am experimenting with recipes. In my recipe, I create a view with a block and was hoping to add that block to a layout during the install process.
Here is the solution I found.
$layout = layout_load('<machine-name-layout>');
$layout->addBlock('<module-that-created-block>', '<machine-name-of-block>', '<region-to-insert-block>');
$layout->save();
Recent comments
Thanks @indigoxela! It works (at least as a start): Now I can use the filter... BUT: I get, as you predicted, a lot of duplicates (One node appears 7 times, other 5 times, other 3...
Parent items won't show on Leaflet Widget.
Thank you all for the quick help - or trying to. And I apologize for not properly documenting this seeming flaw in Backdrop. I was too eager to find a work-around (cannot have a non-...
Paypal button code gets messed-up
Yes Olaf, Works in most cases, but not with what was in the field originally (sorry, that is now deleted). I think it was very similar to this, and the paypal code was added at the...
Paypal button code gets messed-up
This is orig. code. Backdrop removes the form action and insert an end-form later (or move it down). Hm, this works for me. I've set up a new text format (at admin/config/...
Paypal button code gets messed-up
I have tried that as well - no difference. Code get messed up anyway. And - my style tags are needed in order for the page to look fine no matter what width the display is (style clear-...
Paypal button code gets messed-up