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

Comments

agentrickard’s picture

Assigned: Unassigned » agentrickard

I 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'.

roboneale’s picture

Great, 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.

agentrickard’s picture

We have an intern working on a patch right now, which I expect to see in the queue today.

eabrand’s picture

Status: Active » Needs review
StatusFileSize
new2.48 KB

Here 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.

agentrickard’s picture

StatusFileSize
new4.73 KB

It 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.

agentrickard’s picture

That 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.

agentrickard’s picture

StatusFileSize
new3.92 KB

And here it is.

roboneale’s picture

That's working exactly as expected. Thanks to you and your intern for the quick turnaround.

agentrickard’s picture

Status: Needs review » Fixed

Committed and released as 6.x.1.6. Nice work everyone.

Status: Fixed » Closed (fixed)

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