4 Replies Latest reply: Feb 20, 2014 12:29 AM by Ramesh V RSS

    How can i add a topLevelNode in trayA?

    Ramesh V

      Hi All,

       

      I am facing an issue while adding top level node for trayA.

       

      Below is the code to refer.

       

      <$include super.custom_finish_layout_init$>

      navBuilder.trayA.addTopLevelNode("MyProfile");

       

      Regads,

      Ramesh

        • 2. Re: How can i add a topLevelNode in trayA?
          Ramesh V

          Hi Jonathan,

           

          I followed the above Document and taken reference MenuExample custom component.

           

          Below is the Code to refer.

           

          <html>

          <head>

          <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

          <title>

          XXX_New_Trays Menu htmlIncludeOrString</head>

          <body>

           

          <@dynamicdata CoreMenuItems@>

          id,           label,       linkType, linkData

          PROFILES_LIST,  My Profiles,

          <@end@>

           

           

          <@dynamicdata CoreMenuItemRelationships@>

          <?commatable mergeKey="primaryKey"?>

          parentId,    id,           loadOrder

          MENU_B,      PROFILES_LIST,  1000

          <@end@>

           

           

           

          <@dynamicdata CoreMenuItemsFlags@>

          id,           flags

          PROFILES_LIST,  isLoggedIn

          <@end@>

           

          <@dynamicdata CoreMenuItemsImages@>

          id,           image,                imageOpen

          <@end@>

           

           

           

           

          <@dynamichtml custom_navigation_menu_items@>

          <$include super.custom_navigation_menu_items$>

          <$rsFirst("NavigationMenuItems")$>

          <$rsFindNextRow("NavigationMenuItems", "id", "PROFILES_LIST")$>

          <$NavigationMenuItems.loadOrder = ""$>

          <$endif$>

          <@end@>

           

           

           

           

          <@dynamichtml navigation_modify_rset_menu_item@>

          <$include super.navigation_modify_rset_menu_item$>

           

          <@end@>

           

           

           

          </body>

          </html>

           

          I need to provide any more info to the above code to display topLevelNode under Trays Layout of MENU_B in Tree Structure.

          Please correct if anything has to be change in the above code.

           

          Regards,

          Ramesh V

          • 3. Re: How can i add a topLevelNode in trayA?
            Jonathan Hult

            What is currently happening? Are you receiving any JavaScript errors?

             

            Jonathan

            http://jonathanhult.com

            • 4. Re: How can i add a topLevelNode in trayA?
              Ramesh V

              Hi Jonathan,

               

              As per the above reference MenuExample Its working. I added custom Top Level Node under Trays using the below code.

               

              <html>

              <head>

              <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

              <title>

              XXX_New_TraysMenu htmlIncludeOrString</head>

              <body>

               

               

              <@dynamicdata CoreMenuItems@>

              id,               label,           linkType,     linkData

              MY_PROFILE_LIST,  My Profiles List, ,

              MY_PERSONAL_CHECKINS_LIST,          Profile Search/ New Checkin,         ,

              <@end@>

               

               

               

               

              <@dynamicdata CoreMenuItemRelationships@>

              <?commatable mergeKey="primaryKey"?>

              parentId,        id,               loadOrder

              MENU_B,          MY_PROFILE_LIST,  60

              MY_PROFILE_LIST,     MY_PERSONAL_CHECKINS_LIST,          10

              <@end@>

               

               

               

              <@dynamicdata CoreMenuItemsFlags@>

              id,               flags

              MY_PROFILE_LIST,  isLoggedIn

              MY_PERSONAL_CHECKINS_LIST,          isContributor

              <@end@>

               

               

              <@dynamicdata CoreMenuItemsImages@>

              id,            image,                    imageOpen

              MY_PERSONAL_CHECKINS_LIST,    ScsPageItem.gif,

              <@end@>

               

               

               

              <@dynamicdata custom_dynamic_menu_items_template_data@>

              <?commatable indexedColumns="id"?>

              id,                                parentId,                      linkType, flags

              MY_PERSONAL_CHECKINS_TEMPLATE,     MY_PERSONAL_CHECKINS_LIST,     external, isContributor

              <@end@>

               

               

              <@dynamichtml custom_navigation_menu_items@>

              <$include super.custom_navigation_menu_items$>

               

              <$dpCheckinCount = 0$>

              <$if utLoadResultSet("pne_portal", "PersonalURLS")$>

                  <$if rsFirst("PersonalURLS")$>

                      <$loop PersonalURLS$>

                          <$if isTrue(dpIsCheckin)$>

                              <$ddAppendIndexedColumnResultSet("custom_dynamic_menu_items_template_data", "NavigationMenuItems", "id", "MY_PERSONAL_CHECKINS_TEMPLATE")$>

                              <$rsLast("NavigationMenuItems")$>

                              <$NavigationMenuItems.id = "MY_PERSONAL_CHECKINS_" & dpCheckinCount$>

                              <$NavigationMenuItems.label = dpDisplayLabel$>

                              <$NavigationMenuItems.linkData = js(dpCheckinURL)$>

                              <$NavigationMenuItems.loadOrder = dpCheckinCount$>

                              <$dpCheckinCount = dpCheckinCount + 1$>

                          <$endif$>

                      <$endloop$>

                  <$endif$>

              <$endif$>

               

              <$if dpCheckinCount == 0$>

              <$rsFirst("NavigationMenuItems")$>

                  <$rsFindNextRow("NavigationMenuItems", "id", "MY_PERSONAL_CHECKINS_LIST")$>

                  <$NavigationMenuItems.loadOrder = ""$>

              <$endif$>

               

              <@end@>

               

               

               

              <@dynamichtml navigation_filter_rset_menu_item@>

              <$include super.navigation_filter_rset_menu_item$>

               

              <@end@>

               

               

               

              <@dynamichtml navigation_modify_rset_menu_item@>

              <$include super.navigation_modify_rset_menu_item$>

                 

              <@end@>

               

               

              </body>

              </html>

               

              Regards,

              Ramesh V