From 8146a6d8633a404715f15874a3925ebf74aa99c3 Mon Sep 17 00:00:00 2001
From: Tim Steiner <tsteiner2@unl.edu>
Date: Tue, 9 Nov 2010 22:53:42 +0000
Subject: [PATCH] Change the node edit form to always provide a menu link, but
 have the option to hide the menu item.

git-svn-id: file:///tmp/wdn_thm_drupal/trunk@308 20a16fea-79d4-4915-8869-1ea9d5ebf173
---
 sites/all/modules/unl/unl.module | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sites/all/modules/unl/unl.module b/sites/all/modules/unl/unl.module
index 7da6e8c6..045ae800 100644
--- a/sites/all/modules/unl/unl.module
+++ b/sites/all/modules/unl/unl.module
@@ -218,7 +218,7 @@ function unl_form_alter(&$form, $form_state, $form_id) {
    * be using the menu to build a site hierarchy.  Instead, add a button that will
    * determine whether or not the menu link is visible or not.
    */ 
-  if ($form_id == 'page_node_form') {
+  if (substr($form_id, -10) == '_node_form') {
     $form['menu']['#title'] = 'Site hierachy';
     
     $form['menu']['enabled']['#default_value'] = TRUE;
-- 
GitLab