Give you menu item without link.
Replace anchor tag (<a>) with <span> or remove attribute href in <a> then replace with #.
Ex:

<ul class="menu">
  <li><a href="/">Home</a></li>
  <li><a href="#">My Account</a></li> <!-- this link with empty_link checked-->
    <ul>
      <li><a href="/user">Profile</a></li>
      <li><a href="/user/edit">Edit</a></li>
      <li><a href="/user/logout">Logout</a></li>
      <li><span>Last Login 6 hours ago</span></li> <!-- this link with empty_link checked-->
    </ul>
</ul>

Link to project page:

https://www.drupal.org/sandbox/m_roji28/2296979

Clone:

git clone --branch 7.x-1.x http://git.drupal.org/sandbox/m_roji28/2296979.git empty_link

Comments

ijortengab’s picture

Issue summary: View changes
gbisht’s picture

Status: Needs review » Needs work

Hi ijortengab,

Nice idea for a module but there are many issue with the module. First please change your git clone path, it should be "git clone --branch 7.x-1.x http://git.drupal.org/sandbox/m_roji28/2296979.git empty_link" because without this no one will be able to make clone of your module.

Automatic PAReview:

Manual Review:

  • There are many coding standard and commenting issues, so please visit https://www.drupal.org/coding-standards and https://www.drupal.org/coding-standards/docs for standards you should be following.
  • On checking saving menu with empty link I'm getting a notice and an warning:
    1. Notice: Undefined index: class in theme_empty_link_menu_link() (line 96 of /var/www/drupal7/sites/all/modules/custom/empty_link/empty_link.module).
    2. Warning: in_array() expects parameter 2 to be array, null given in theme_empty_link_menu_link() (line 96 of /var/www/drupal7/sites/all/modules/custom/empty_link/empty_link.module).
  • Anchor tag generated for empty link is without href, I think there should be href but with a #, because anchor tag with href is not a valid html
ijortengab’s picture

Issue summary: View changes
ijortengab’s picture

Status: Needs work » Needs review

@gulab.bisht: thx for review
i was recode to drupal standard, please visit:
http://pareview.sh/pareview/httpgitdrupalorgsandboxmroji282296979git

joachim’s picture

I'm sure I've seen this functionality in a contrib module before!

joachim’s picture

Status: Needs review » Needs work
ijortengab’s picture

ouch,.. i have never seen that module (special_menu_items) before.
maybe close? yeah

ijortengab’s picture

Status: Needs work » Closed (duplicate)
gisle’s picture

Well, with an unresponsive maintainer, 32 open bugs in the issue queue, and no commits since September 2012, it looks like the maintainer of Special menu items could use some help. Maybe you should consider looking into pursuing an Abandoned Module Application?

avpaderno’s picture

Status: Closed (duplicate) » Closed (won't fix)