There are a number of areas in the site I'm developing where I would like a node to be contained within a section without appearing in the menu.
I can achieve this by logging in as a user with 'administer menu' permissions and unticking 'enabled' on the 'list items' tab of the menu editing form. This has the desired effect and the menu node edit controls continue to apply to the node. However, I'd like 'normal' users to be able to do this, and granting 'administer menu' permissions adds complexity to their user interface.
Would it be possible to add a 'hide from menu' tick box to the section fieldset on the node editing form? This would then allow a user without 'administer menu' permissions to create a node within a section and mark the corresponding menu item 'disabled'.
Or if you can suggest an alternative method of achieving this I'd be grateful.
Thanks
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 517732-enable.patch | 3.92 KB | agentrickard |
| #5 | 517732-enable.patch | 4.73 KB | agentrickard |
| #4 | menu_node_edit-517732.patch | 2.48 KB | eabrand |
Comments
Comment #1
agentrickardI like that idea, and in fact need it to solve a similar problem, so I will likely make this happen in the next week or so.
We probably need a permission for the access to this check box. Something like 'enable menu items'.
Comment #2
roboneale commentedGreat, glad it's mutually beneficial and the new permission sounds like a useful addition.
I'll look forward to seeing it in the near future. Let me know if I can help test before a new release.
Comment #3
agentrickardWe have an intern working on a patch right now, which I expect to see in the queue today.
Comment #4
eabrand commentedHere is a patch for that. It creates a new node permission & puts an "enable" checkbox on the node edit form for the users with the proper permissions.
Comment #5
agentrickardIt is easier to do this if the field is marked 'Hidden' instead of 'Enabled' because we can just use the natural flow of menu submissions for nodes.
The attached patch seems to work just fine. Needs documentation, since it adds a 'set menu visibility' permission.
Comment #6
agentrickardThat patch accidentally has parts of #512594: After upgrade to 6.x-1.4 content can only be assigned to top level of section in it. I will have to roll a new version.
Comment #7
agentrickardAnd here it is.
Comment #8
roboneale commentedThat's working exactly as expected. Thanks to you and your intern for the quick turnaround.
Comment #9
agentrickardCommitted and released as 6.x.1.6. Nice work everyone.