I am applying to have my sandbox project, pslinkblocks, promoted to full project status.
This project creates a module that implements two blocks: one containing the Main Links (formerly known as primary links), and the other containing the Secondary Links, as configured on the Menu Settings page.
This project came out of a usability frustration with the Menu Blocks module: I could not figure out a way to create a block containing the Secondary Links (especially when they are defined to be the 2nd level of the Main Menu). Since the Menu Blocks module has a more complex UI, targeting more complex use cases, I decided that it would be useful to have a simple module targeted specifically to the primary/secondary links use case, rather than try to add this functionality to the Menu Blocks module.
Project page: http://drupal.org/sandbox/paulmckibben/1478876
Git repository: git clone http://git.drupal.org/sandbox/paulmckibben/1478876.git pslinkblocks
This is for Drupal 7 only.
Thank you.
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | automated3.txt | 421 bytes | dark-o |
Comments
Comment #1
patrickd commentedwelcome,
Please take a moment to make your project page follow tips for a great project page.
Please take a moment to create a README.txt that follows the guidelines for in-project documentation.
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.
(At least this has to be done before switching back to needs review)
while waiting for an in-depht review of your module you can start out fixing some coding style issues detected by automated tools:
http://ventral.org/pareview/httpgitdrupalorgsandboxpaulmckibben1478876git
You can also get a review bonus and we will come back to your application sooner.
regards
Comment #2
paulmckibbenpatrickd, thank you for your quick response. I've moved the code to the 7.x-1.x branch and have cleaned out the master branch. I've also added a README.txt. Finally, I've fixed the whitespace issues identified by the ventral code reviewer.
Comment #3
tonybuckingham commentedPretty straighforward module; can't find anything really wrong with it.
The only thing I would point out is that, while the "blocks" module is enabled by default, it is, in theory, a module a user could disable. Since this module explicitly makes reference to functionality provided by the "blocks" module, I would add a dependency on the "blocks" module to your info file:
Comment #4
paulmckibbentonybuckingham, thank you.
I've updated the info file, adding a dependency on the core block module.
Comment #5
chertzogThe drupal menu system automatically generates blocks for each menu.
So if i understand this module correctly, if I have 2 menus: menu-1 and menu-2, and they are set as primary and secondary links respectively, I will now have 2 blocks that output each menu. 1 from the core menu and block system, and the other from your module.
I dont really see the point of this module, its just duplicating what core menu and blocks does. Maybe I'm missing something.
From menu.module:
Comment #6
patrickd commentedAs far as I understand this, the purpose is to create two blocks for one menu
example menu structure (menu with subitems):
When I'm on Products the one block will only show
- About us
- Products
- References
And the other block show the sub-items
- Product 1
- Product 2
- Product 3
At my firm we commonly printing out the menu two times and hiding them conditionaly by css, but this module may is a nice alternative
Comment #7
paulmckibbenpatrickd is correct: the use case is when the secondary links are set to be the second level of the same menu that generates the main links.
chertzog, I agree that if your main and secondary links come from different menus, this module is unnecessary. It's only when the come from different levels of the same menu that this module is useful.
Comment #8
chertzogOk. My bad. Just a little case of misunderstanding. Would you consider maybe changing the name of the module to something like second level menu blocks or menu children blocks? I think this would help reduce any confusion about what the module does. Just a thought...
Comment #9
paulmckibbenChertzog, how about "Main Links and Secondary Links Blocks"? This terminology would be consistent with the terminology used at admin/structure/menu/settings. I'd prefer to be consistent.
Thanks,
Paul
Comment #10
dark-o commentedI am trying to review your module, I tried to check this out but I am only getting README.txt file, I tried :
git clone http://git.drupal.org/sandbox/paulmckibben/1478876.git pslinkblocks
and
git clone DarkoKantic@git.drupal.org:sandbox/paulmckibben/1478876.git
am I missing something, sorry I am new to git
Thanks
Darko
Comment #11
patrickd commentedgit clone http://git.drupal.org/sandbox/paulmckibben/1478876.git pslinkblocksthis will clone the master branch, as the code lies in the 7.x-1.x branch you got to switch over:
git checkout 7.x-1.xgit clone DarkoKantic@git.drupal.org:sandbox/paulmckibben/1478876.gitThis would only work if you got write access to the sandbox's repository and would allow you to push into it.
Comment #12
dark-o commentedok, it worked like this
git clone --branch 7.x-1.x DarkoKantic@git.drupal.org:sandbox/paulmckibben/1478876.git
So I got your files now
reviewing....
Comment #13
dark-o commentedQuestion;
Does your module support hierarchical menus. I included one of my hierarchical menus as a secondary links. The block was created OK, but when I included it in the Sidbar First only the first level of menu items was showing. I would expect it to be expandable if there are sub menu items, like navigation menu block.
Comment #14
patrickd commentedDon't forget to remove the assigning when your done.
Comment #15
dark-o commentedyep, still reviewing, just waiting for answer to above question
thanks
Comment #16
dark-o commentedAutomatic review
----------------------------
see attached file bellow
Manual review
------------------
I created blocks as advised, it worked, however hierarchy of the menu was not carried in the Secondar Links block. I expected it to behave like Navigation menu, i.e when I include Navigation menu in the right hand side column I can expand end colapse menu items. If this (non expandable menu items) is expected behavior than please document it in README.
Comment #17
dark-o commentedautomated review
Comment #18
klausiClosing due to lack of activity. Feel free to reopen if you are still working on this application.