Closed (fixed)
Project:
Block Title Link [D7]
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
23 Sep 2011 at 15:18 UTC
Updated:
6 Dec 2011 at 18:40 UTC
Could the Block Title Link fieldset could be shown on the block add form as well? Currently, two steps are required to create a block with a title link.
Comments
Comment #1
ngmaloney commentedIt looks like the $form_id change from D6 to D7 on the block add form. Latest commit resolves.
Comment #2
star-szrThanks, I see the fieldset now on the block add form but submitting the form does not save the Block Title Link data. I had already tried just adding the $form_id to the condition as you have done, should have mentioned that.
Comment #3
ngmaloney commented@Cottser - I noticed that when testing yesterday. It looks like the cause is the submit handler doesn't yet have the block's delta. I'm looking how other modules (menu block) solve this problem and hope to roll a patch ASAP. If you can think of a method for solving this problem please feel free to post some code.
Comment #4
star-szrIt looks like menu block uses
hook_block_save()rather than attaching a submit handler.Comment #5
ngmaloney commentedawesome. thanks for taking a look. I should be able to roll a patch sometime soon.
EDIT: This patch is taking longer than anticipated. It is actively being worked on, however.
Comment #6
star-szrAnything in progress I can help with?
Comment #7
ngmaloney commented@Cotter I'm having trouble using hook_block_save(). My understanding is it requires hook_block_configure() for generating the form. According to a comment in the docs, hook_block_configure can ONLY change blocks created by the module it is declared in. Menu Block can use this method as it is only altering blocks created by menu block.
I'm trying to find a way to have the submit handler triggered after the block is saved and then pass in the block id in the form_state variable. I can't seem to find any modules that do this. If you could locate a module that does this (or a code snippet) that would be a big help.
Comment #8
ngmaloney commentedVersion 7.x-1.2 contains fix.
Comment #9
star-szrLooks good, thanks!