This module allows to create parent menu items acting as a container which simply points to a page listing its children items.
Drupal 7 only.

Project page: http://drupal.org/sandbox/bripatand/1787684

Repository: git clone --recursive --branch 7.x-1.x http://git.drupal.org/sandbox/bripatand/1787684.git menu_listchildren

Similar modules:
http://drupal.org/project/menu_firstchild. The menu item only points to the first child.
http://drupal.org/project/menu_item_container. No URL path is associated with the menu item. Not ported yet to D7.
http://drupal.org/project/special_menu_items. No URL path is associated with the menu item.

The module is simple enough to ensure I'll have time to support it.

Reviews of other projects:
http://drupal.org/node/1819198#comment-6634880
http://drupal.org/node/1809404#comment-6597362
http://drupal.org/node/1819138#comment-6631872
http://drupal.org/node/1820260#comment-6640286

Comments

brajendrasingh’s picture

HI Patrick,

Automated Review
Below are listed issues found -

  • Remove "version" from the info file, it will be added by drupal.org packaging automatically.
  • Remove "project" from the info file, it will be added by drupal.org packaging automatically.
  • Remove "datestamp" from the info file, it will be added by drupal.org packaging automatically.

Other things looking fine. There are some drupal coding standard issues in your module code.
For automated testing you can use below url -
http://ventral.org/pareview

rob holmes’s picture

Hi There,

The link provided for the Git Clone should be 'git clone --recursive --branch 7.x-1.x http://git.drupal.org/sandbox/bripatand/1787684.git menu_listchildren' so that it doesnt require authentication with your details.

.info file refers to a file that does not exist.
files[] = menu_listchildren.test

Mssing return types in docblocks for menu_listchildren_get_children, menu_listchildren_page, theme_menu_listchildren_list

Line 182 the $menu variable does not seem to be used in the scope of the function.

rob holmes’s picture

Issue summary: View changes

Fix some typos

bripatand’s picture

Dear brajendrasingh,

Thanks for taking the time to review my module and the useful link.

I fixed the issues found in the info file and the ones reported by pareview.

Please note that the tool still raises a few warning about the line size exceeding 80 characters but I don't think those are blocking issues.

Patrick

bripatand’s picture

Hi Rob,

Thanks for your time and comments.

I believe I have fixed all the issues you raised.

Note that the file menu_listchildren.test was missing from the git index and has been added.

Did you use a specific tool to find those issues?

Cheers

Patrick

weebpal’s picture

StatusFileSize
new2.07 KB

Everything seems ok now. However, I also see two minor
- Maybe use the placeholder is more easy to understand and create language file for this command: t('Enter') . ' ' . LIST_CHILD_MENU_TOKEN . ' ' . t('to link to page listing the children.')
- And you seem still have a few miss coding standard, please update it

After resolve them, you can do some review as http://drupal.org/node/1410826, and your project will be approved quickly.

bripatand’s picture

Thanks. I fixed the last minor issues as suggested.

ramsonkr’s picture

If you use following pattern in path "menulistchildren/string" (string can be any thing), then it fails.

bripatand’s picture

I'm not sure I understand. What do you mean by "it fails"?
What error message do you get and when doing what exactly (edit the path in a menu item and saving, typing the URL in your browser etc...)

In any case, the path "menulistchildren/string" is not a valid path so it is normal you get a "Not available" message.

What would you expect it should happen?

Thanks for clarifying

ramsonkr’s picture

typing the URL in browser

the path "menulistchildren/string" is not a valid path so it is normal,
displaying "Not available" message and list of all menu items.

But it displaying only "Not available" message for "menulistchildren/number".
expecting same results.

riho’s picture

As far as I tested, it seemed to work as intended. Looks good and it's definitely something I will use in upcoming projects.

It's probably not a deal breaker, but in the future you could consider putting the html in theme_menu_listchildren_list function into a separate template file for easier overriding purposes.

varunmishra2006’s picture

Manual Review

I looked at the code and the functionality. Everything seems to be working fine.
Please modify the project page to be more detailed. Check http://drupal.org/node/997024
Right now the module display sub menu items up to one level. It would be much better if it will show hierarchical structure.

bripatand’s picture

Thanks to you all.
Here is what I've done to address your comments.

  • Return Page Not Found when the path menulistchildren/something is not valid
  • Add more information and pictures to the project page
  • Log two feature requests
bripatand’s picture

Issue summary: View changes

Fix git clone url mistake

bripatand’s picture

Issue tags: +PAreview: review bonus

Added tag: PAReviews: review bonus as outlined on http://drupal.org/node/1410826

wimcms’s picture

Into Edit menu link Compare this message:
Notice: Undefined index: #description in menu_listchildren_form_alter() (line 53 of [...]\sites\all\modules\menu_listchildren\menu_listchildren.module).

bripatand’s picture

Can you give more details on how you get this message?
I think I fixed it in my last commit but I cannot reproduce it, so I can't be sure.

Thanks

wimcms’s picture

Ehm. Compare only this message in all page.

bripatand’s picture

Sorry but I don't have enough information to reproduce the issue with the information you gave me!

Can you confirm you still see this problem with the latest commit?

If so, can you also attach a screen shot of the menu item edit screen where you use as a path?

Thanks for your understanding

klausi’s picture

Status: Needs review » Postponed (maintainer needs more info)

This looks like a feature that could go into one of the existing module you already mentioned? Module duplication and fragmentation is a huge problem on drupal.org. We prefer collaboration over competition, so please open issue in the queue of one of those modules and try to integrate your stuff there. You should also get in contact with the maintainers and discuss the issue and your possible co-maintainership.

If that fails for whatever reason please get back to us and set this back to "needs review".

klausi’s picture

Issue summary: View changes

Add reviews of other projects

bripatand’s picture

I open an issue for the module special_menu_item which seems to be the most adequate host currently. The module menu_first_child seems to be the most active project and would be another candidate but it would need to be renamed to reflect both use cases. Otherwise it would be misleading. Can you rename a module?
The menu_item_container module is only available in version 6 and there were no commit since 45 weeks.

wimcms’s picture

Now it's ok!

bripatand’s picture

I contacted the guy responsible for the project special_menu_item which was the best candidate to integrate my code with its module as I explained previously. Here the result of our discussions http://drupal.org/node/1824658.
He suggested that he would prefer to create an API that I can use and other as well. But it doesn't seem it will happen any time soon. I believe that despite there are a number of modules altering the menu system using special token , , etc..., they all implement distinct functionality and do not overlap according to me.

bripatand’s picture

Status: Postponed (maintainer needs more info) » Needs review

Put it back to "needs review" as suggested.

suzane.goncalves’s picture

Priority: Normal » Minor
StatusFileSize
new13.88 KB

Hi @bripatand,

Automatic Review:
It's all right in Coder Module.

Manual Review:
- No LICENSE.txt were found so it is ok.

- Repository is ok.

- I found a issue that should be corrected. I tried to create a menu with path, and some children inside. Then I accessed the parent menu, the one I just created, and every children were listed correctly. After that I set the parent menu as hidden. But when I refreshed the page the title had changed to "Not available".

However if you do the same with any drupal menu, it does not alter the title.

Everything else is working very well. I really appreciated this module!

klausi’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -PAreview: review bonus

Renaming modules is currently only possible by creating a new project.

Ok, so I guess your module deserves its own place.

manual review:

  1. "define('LIST_CHILD_MENU_TOKEN', '');" all constants defined by your module must be prefixed with your module's name to avoid name clashes.
  2. Same for the constants in menu_listchildren.test.

Otherwise looks RTBC to me. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

bripatand’s picture

Thanks. I renamed the constants as suggested. Will try to review other projects.

klausi’s picture

Status: Reviewed & tested by the community » Fixed

no objections for a week, so ...

Thanks for your contribution, bripatand!

I updated your account to let you promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and get involved!

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.

Thanks to the dedicated reviewer(s) as well.

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

Fix typo