Closed (fixed)
Project:
Accordion Blocks
Version:
7.x-3.0
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Apr 2012 at 09:43 UTC
Updated:
16 Sep 2012 at 18:05 UTC
Jump to comment: Most recent file
Comments
Comment #1
pflame commentedDid you mention the Block titles for the blocks that you added to accordion effect?
Mention what theme you are using.
Comment #2
Nick Fedchik commentedYes, the blocks that I include into AB.
Comment #3
Nick Fedchik commentedUpdate to 3.1.
See the title of AB, but still didn't see the titles of included blocks.
On the same page I output Views Accordion block, where each node has a title in accordion element.
Comment #4
anup.singh commented/* solution for blank title*/
replace line 173 in "accordion_blocks.module" ie //
**********************************************************
$blocks_content[$key]->title = $block_data->title;
$blocks_content[$key]->content = $block_content['content'];
************************************************************
with
**********************************************************
$blocks_content[$key]->content = $block_content['content'];
if($block_data->title) {
$blocks_content[$key]->title = $block_data->title;
}
else {
$blocks_content[$key]->title = $block_content['subject'];
}
**********************************************************************
it will replace your title with block subject if title is empty
if you have any problem reply me
Comment #5
pflame commentedHi anup,
Looks like this solves the issue. Create a patch and send me, I will apply the patch. Look at http://drupal.org/node/1319154 http://drupal.org/node/707484 links about how to create a patch.
Comment #6
Nick Fedchik commentedI apply the changes from #4
Then create AB woth three core blocks: "Last Users", "Users Online" and "Last Forum Topics"
Looks incorrect.
First block "Last Users" is open by default, no title shown (even whedn I click on a next block in AB!).
But the "Last Users" shown on collapsed block below (second block).
And "Users Online" on a third line, which shoud be "Last Forum Topics".
We have a bit progress - some titles are shown, but we have to pull up the headers on a one level.
Maybe the problem where the title data passed to JavaScript?
Comment #7
sharique commentedI have created patch for it. please review.
Comment #8
brisho commentedThe patch in comment #7 does not comply with Drupal patch naming standards or coding standards. Here's a patch that does comply.
Comment #9
aloyr commentedapplied patch from #8. In the case of a block without a title, I get the error below:
Notice: Undefined index: subject in accordion_block_content() (line 170 of/home/peter/workspace/d7/sites/all/modules/accordion_blocks/accordion_blocks.module).Comment #10
brisho commentedPlease ignore the patch in comment #8 and use this one instead. It takes into account the possibility that the $block_content['subject'] element may not be set.
Comment #11
aloyr commenteddownloaded & applied the patch on #10. worked as described. accordion block items now have their titles showing. good deal! :)
Comment #12
pflame commentedThe patch is applied to 7.x-3.x branch, it will be available in the 7.x-3.x branch.