This module allows blocks to be attached in standard Drupal Menus. It tooks its inspiration from Menu Views module.

Blocks are added inside the <li> from theme_links, immediately after the standard <a> tag that links to a menu item. Block permissions are respected so that blocks are not shown to users who do not have privilege to see them.

Attached block data is saved in the menu item object.

This module is for Drupal 7.

Project Page: http://drupal.org/sandbox/cam8001/1419382
Repository: http://drupalcode.org/sandbox/cam8001/1419382.git

CommentFileSizeAuthor
#9 menu.jpg384.11 KBpgogy
#9 menu2.jpg60.14 KBpgogy
#1 drupalcs-result.txt5.6 KBtargoo

Comments

targoo’s picture

Status: Needs review » Needs work
StatusFileSize
new5.6 KB

It appears you are working in the "master" branch in git. You should really be working in a version specific branch. The most direct documentation on this is Moving from a master branch to a version branch. For additional resources please see the documentation about release naming conventions and creating a branch in git.
Review of the master branch:

This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. Get a review bonus and we will come back to your application sooner.

Source: http://ventral.org/pareview - PAReview.sh online service

targoo’s picture

Hi

I like this idea of your module and will be keen to use it.

Manual review :

1) menu_attach_block.css
background: transparent url("/misc/arrow-asc.png") no-repeat scroll;
background-image: url("/misc/arrow-desc.png");
Where do we find this images ?

2) menu_attach_block.info
dependencies[] = views
Are you depending on the view module ?

3) menu_attach_block.module
$output = '' in menu_attach_block_link()
this variable is not used / delete it

4) menu_attach_block.module
$title = '' . check_plain($item['title']) . ' ';
Bad:
print '<a href="/'. check_plain($url) .'">';

Good (URLs must be checked with check_url()):
print '<a href="/'. check_url($url) .'">';
http://drupal.org/node/28984

cameron tod’s picture

Thank you very much targoo, much appreciated. I will implement your suggestions and post an update.

cameron tod’s picture

Regarding the image paths in CSS, they refer to files keep in the core 'misc' folder. This will break if Drupal is installed in a subdirectory. I will copy the files into the module directory.

cameron tod’s picture

Status: Needs work » Needs review

The code is now cleaned up, addressing your concerns, and passes Drupal Code Sniffer and the hosted version thereof at http://ventral.org/pareview.

sankatha’s picture

Status: Needs review » Needs work

Tested and found the following minor issue which has been logged as an issue against the project http://drupal.org/node/1508370

cameron tod’s picture

Status: Needs review » Needs work
cameron tod’s picture

Status: Needs work » Needs review
pgogy’s picture

Status: Needs work » Needs review
StatusFileSize
new60.14 KB
new384.11 KB

Hello,

Using the default drupal 7 theme I got this after adding a block?
Not sure if my theme doesn't support this module?

I then added one to the navigation menu and got picture 2.

Not sure if this is me doing something wrong?

----

For the .info, maybe add this in the user interface package?

----

Possible to maybe use hook_permissions to only allow certain people to do this?

I like the idea for this - but guessing I am doing something wrong.

cameron tod’s picture

Thanks pgogy.

There's no module CSS support at present for attaching to vertically oriented Menus, but that's a very good suggestion. I will put this in before requesting full project access.

I've created an issue which you can watch:

#1583524: Add configurable CSS support for attaching blocks to vertical menus

cameron tod’s picture

Ok, I have added backend and CSS support for horizontal and vertical menu attachment. Please have a look and test under your theme and see what you think.

sankatha’s picture

Status: Needs review » Reviewed & tested by the community

Automated Review: Ran through Drupal Code Sniffer and all looks fine.
Manual Review: Installed the menu in a fresh D7 installation and it worked as expected.

Looks RTBC to me...

patrickd’s picture

Your project page is not very detailed, please have a look at the tips for a great project page, you may also use HTML-tags for better structure.

menu_attach_block_form_menu_overview_form_alter: drupal_add_css(): Your adding the css you've already added by .info - there should be no problem removing this line.

have to go, will continue later

cameron tod’s picture

Unneeded drupal_add_css is now removed, and I have fixed a CSS bug that I hadn't noticed before (with Bartik).

Will spruce up the project page now.

cameron tod’s picture

The project page should be a bit more useful now.

patrickd’s picture

Status: Reviewed & tested by the community » Fixed

Sorry for the delay (damn exams are such a waste of time)

Great module, code is well documented and the module's functionality is very nice implemented! Found no security flaws,
therefore,

Thanks for your contribution and welcome to the community of project contributors on drupal.org! :)

I've granted you the git vetted user role which will let you promote this to a full project and also create new projects as either sandbox or "full" projects depending on which you feel is best.

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

As you continue to work on your module, keep in mind: Commit messages - providing history and credit and Release naming conventions.

Thanks to the dedicated reviewer(s) as well.

cameron tod’s picture

Thanks patrickd and everyone for all your help in getting this to full project status!

targoo’s picture

You are welcome. I will soon be using your module !

Status: Fixed » Closed (fixed)

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