Announcement

Collapse
No announcement yet.

[SOLVED] Tree Menu

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • [SOLVED] Tree Menu

    I am trying to build a tree menu. I am starting small to see what works, then build on it. I want it to be dynamic so I am building it OnLoad

    I create a new application, select TreeMenu.

    Then I enter this in the OnLoad section

    sc_appmenu_reset('menu');
    sc_appmenu_create('menu');


    sc_appmenu_add_item(
    'menu',
    '0',
    '0',
    1,
    1,
    1, 1, 1,
    );

    sc_appmenu_add_item(
    'menu',
    'menu1',
    'sample3',
    ,
    ,
    , , ,
    );
    sc_appmenu_add_item(
    'menu',
    'menu2',
    'sample5',
    ,
    ,
    , , ,
    );

    Nothing comes up. WHY?

  • #2
    Re: Tree Menu

    try this :

    $menu = "testtree";
    //-------------------------------------------------------------------------
    sc_appmenu_reset($menu);
    sc_appmenu_create($menu);
    //-------------------------------------------------------------------------
    //sc_appmenu_add_item("String Menu_Name", "Id_Item", "Id_Parent", "Label", "Aplication", "Parameters", "Icon", "Hint", "Target")

    sc_appmenu_add_item($menu,'itm_0',,'Root_Label_1', ,,);

    sc_appmenu_add_item($menu,'itm_1','itm_0','Child_L abel_1_1',,,);

    sc_appmenu_add_item($menu,'itm_2','itm_0','Child_L abel_1_2',,,);

    sc_appmenu_add_item($menu,'itm_3',,'Root_Label_2', ,,);

    sc_appmenu_add_item($menu,'itm_4','itm_3','Child_L abel_2_1',,,);

    Comment


    • #3
      Re: Tree Menu

      sc_appmenu_reset($menu);
      sc_appmenu_create($menu);

      $menu needs to be the name of the application .... that was my problem.

      Comment

      Working...
      X