A while ago we pushed through autopopulating the menu and using the checkbox correctly for Drupal 7.
Just in case you are interested. It makes sense.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexkb’s picture

Hey dman, I hadn't seen that post until now, thanks for pointing it out, and good work on getting it sorted for D7.

I was actually going to do a D7 version of auto_menutitle, after I downloaded the 7-dev version a few weeks back and noticed the problem still existed. I just re-downloaded the -dev version as of a few mins ago, installed it, and noticed it still wasn't in core. Are you already fixing the issues discussed in that thread to get it into core, or did you need some help?

Cheers.

dman’s picture

True. functionality seems to have broken due to some form rendering changes
http://drupal.org/node/322703#comment-2594546

alexkb’s picture

Status: Needs review » Closed (fixed)

The functionality is back in Drupal 7, but it's slightly different to the way this module works. If anyone thinks it should be ported to D7, please let me know, and I'll make it so. marking as closed.

lpalgarvio’s picture

i think before porting Automatic Menu Title do D7, the D7 functionality should be backported to the module.
http://drupal.org/node/905014

only then create a D7 version, with the remaining functionality - enable/disable automatic creation based on node type - as the D7 version isn't meant yet for production usage.

BWPanda’s picture

Priority: Minor » Normal
Status: Closed (fixed) » Active

As far as I can tell, auto-populating the menu title with the node title never made it into D7 core...

I've posted an issue about this in Drupal's issue queue (http://drupal.org/node/1084958), but was wondering what the possibility of this module providing that functionality would be?

dman’s picture

D7 works for me.
Create page, add a title.
Click "Menu settings, "Provide a menu link"
And the title is filled in as expected.

However, it doesn't sync any changes made after that, as this one used to. We had a discussion about what sort of triggers would be needed to make this happen intuitively without breaking some expected behavior in some cases, it got complex, so D7 stopped with the basic autopopulate.

What we have in D7 is the big win IMO, though I guess if the auto-change extra feature could still be wanted.

BWPanda’s picture

Supporting future changes to the node title in the menu title would be a welcome addition, but my main feature request is what Webchick said in the post I referenced:

All we need is a follow-up patch to provide an option to set the default value of this checkbox at admin/structure/types and set that to TRUE on Page and we'll kill the #1 WTF in all of Drupal!

So a simple content type-specific setting for the default value of that 'Provide a menu link' checkbox is what I'm ultimately looking for, something that means users don't have to do anything to get menu items for their Pages by default...
If this module could at least provide that, that'd be awesome!

dman’s picture

Nuh.
Thinking forward with that idea...
You want the menu option to be on and always autogenerated for any node without the user doing anything.

Um, so what logic is used to select the correct parent item? for a new node?

As you describe it, we get all new nodes automatically being added to the root of "primary links" without the creator knowing that was going to happen? I can see that making a mess. Or you want another option to also select one default menu parent that will get filled with all the miscellaneous nodes?
Or to go beyond that (which can be imagined) you need to start building rules for auto-menu-categorizing - which is a huger project.

There is a reason you have to choose to add a menu item - so that you also think about what and where that menu item to be.

Y'see what the problem with that is?

BWPanda’s picture

FileSize
54.88 KB

I want to give the developer the option of setting the menu option to be on and autogenerated for a given content type. With the proposed functionality, developers could setup a 'Service' content type and make it always create a menu item under the 'Our Services' link.

If there's an option to set menu items automatically, then developers can use that for situations where it makes sense. The logic used to select the correct parent item is what's already in core - you choose the parent menu item in the content type settings. It won't work in all situations, so you just don't use this functionality in those situations. But for those situations where it does make sense, you save the user having to perform unnecessary steps and therefore provide a better user experience.

I've attached a screenshot of what I'm proposing, in case I'm confusing anyone.
If the 'Default state' checkbox is checked, then for that content type menu items will be created under the selected parent automatically. If it's left blank, then the functionality remains as it currently is; users have to check it to create menu items for nodes of that type.

BWPanda’s picture

Title: FYI - something like this in core 7 » Auto Menu Title - Drupal 7 version
Component: Miscellaneous » Code
Status: Active » Needs review
FileSize
1.04 KB

What I'm proposing is such simple functionality that I was able to make a module for it, which I've attached :)

I would prefer it to be a part of this module (instead of creating a new module altogether), so I invite the maintainer to use my attached code and make a Drupal 7 version of Auto Menu Title from it.

It's a .tar.gz file as opposed to a patch because I wrote it from scratch for D7.

BWPanda’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Priority: Normal » Major
Status: Needs review » Needs work

I have been made co-contributor of this module and have therefore created a 7.x-1.x branch and committed my code to it (slightly modified from that above).

I am hesitant to release to stable version though until we add in support for upgrading from 6.x... Marking as 'Needs work' for that reason.

drew reece’s picture

BWPanda #10 is ideal !

For sites that want to have a content type that gets inserted into the menu system your module is handy. Am I missing something in core that does this already?
I installed the 7.x-1.x-dev version and it seems fine, but I'm in the middle of a migration so it hasn't been used very much.

The one possible issue I see is the menu item can be left empty (with disabled javascript), but the checkbox is ticked. To be honest I don't want to force the user to select a menu item but it would be nice if the empty field created an alert so they realise the item will not show up in the menu.

BWPanda’s picture

I've just committed a fix that adds a validation function so it's not possible to submit the form without selecting a menu: http://drupalcode.org/project/auto_menutitle.git/commit/6b5d089

BWPanda’s picture

Status: Needs work » Fixed

And I've just created a stable version for D7 with the latest changes (upgrade path doesn't seem that necessary).

Status: Fixed » Closed (fixed)

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