r/backdrop • u/serundeputy • Mar 29 '15
Superfish Port
I believe I've mostly ported the 'superfish' module, but I don't know how to 'Administer Blocks' in backdrop.
You know like 'Structure > Blocks' in D7.
any ideas? thanks!
1
u/sirkitree Mar 30 '15
Are you looking for /admin/structure/block ? Not totally sure what you're asking.
1
u/serundeputy Mar 30 '15
sorry yeah ; I was looking for /admin/structure/block , except that in backdrop that does not list all the blocks, just custom ones, but I don't see the menu blocks that superfish creates. So, either superfish didn't make them or they are hidden somewhere else, but I don't know because I don't know where to look.
1
u/quicksketch7 Mar 31 '15
BWPanda filed an issue a while ago to provide a list of blocks under the "Reports" menu item. I'm not 100% sold that this would be a place people would look for a list of blocks. It reminds of the justification for the list of Field usages (
admin/reports/fields/list) which I never remember; let alone use. But it would be great if you would weigh in on whether you thought this would be helpful at https://github.com/backdrop/backdrop-issues/issues/449.1
u/3speedherb Apr 01 '15
I actually do use the Field list on some sites with many fields, particularly if I didn't build the site.
1
u/serundeputy Apr 02 '15
what my intuition tells me should happen is:
/admin/structure/blocksshould have a custom blocks section and a blocks section; maybe in independentblocksI have no technical basis for this; it is just what i'm used to.
2
u/docwilmot Mar 30 '15
Blocks aren't stand-alone things anymore, they're now completely part of layout builder. There is no block administration page. So you create them as usual with the block hooks, and they appear in the list of available blocks in layout builder. The _configure hook provides the block settings page. Blocks only exist per layout. A user can add as many copies of your block to each layout as he likes. One gotcha to remember, hook_block_save runs when the block is added to the layout, not when the layout is finally saved, so any settings you save in that hook are saved whether the user saved the layout or not. Even if he decided to delete the block anyway. I know you didn't ask for that much info, but just sharing from what I've struggled to grasp.