When creating a menu item for a page that's being imported it would be nice if the max menu link title length was configurable.

Currently it is hard coded to a maximum length of 32.

All the bones are in place for the profile to hold the value of menu_link_max_length, we just need an option at the profile settings form.

Comments

jamesdixon’s picture

Status: Needs work » Needs review
StatusFileSize
new736 bytes

Here is the patch we used to allow configuration of the menu link title length.

jamesdixon’s picture

Updated the patch to take the title length into consideration in side the import_html_guess_label instead of using hardcoded IMPORT_HTML_MAX_LABEL_LENGTH

dman’s picture

1.

+  if (strlen($title) > $proflie['menu_link_max_length'] || empty($title) ) {

typo

... and I see we already are pre-setting menu_link_max_length in import_html_profile_defaults()
So that's looks like it was a step in this direction a while ago.
So in general it's a useful cleanup.

We can put this in. If you tidy up the typo I think the patch can go in easy.

jamesdixon’s picture

Thanks for the review, I just noticed this while going through the commit logs of our site also. Please find the revised patch attached.

  • dman committed 12294a2 on 7.x-1.x authored by jamesdixon
    Issue #2399863 by jamesdixon: Menu link title length is not configurable
    

  • dman committed 1efc916 on 7.x-2.x authored by jamesdixon
    Issue #2399863 by jamesdixon: Menu link title length is not configurable...
dman’s picture

Status: Needs review » Fixed

Thanks!

I'm pushing this in a little blind (untested) as it looks trustworthy and I want to clear the desk here a little before picking up some future dev.

Status: Fixed » Closed (fixed)

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