Forums Archive Index > SmartMenus 5 > no double submenus

Author: phk

Date: 2 Jun 2005 12:19 pm

Hi,

first of all: great job!

now here's my problem:

i need the following menu-structure:

Code:

s_add(
  {N:'GruppenStart',LV:1,MinW:150,T:200,L:15,P:true,S:s_CSSTop,B:'#FFFFFF',BC:'#DBDCEF #4A49A8 #4A49A8 #DBDCEF'},
  [
    {U:'',Show:'Gruppenauswahl',T:'Gruppenauswahl'}
  ]
);
  s_add(
  {N:'Gruppenauswahl',LV:2,MinW:130,T:'',L:'',P:false,S:s_CSSTop},
    [
      {U:'',T:'alle Fonds',Show:'alleFonds'},
      ...
    ]
  );
    s_add(
    {N:'alleFonds',LV:3,MinW:130,T:'',L:'',P:false,S:s_CSSTop},
      [
        {U:'',T:'Mandant 1',Show:'alleFonds_Mandant1'},
        ...
      ]
    );
      s_add(
      {N:'alleFonds_Mandant1',LV:4,MinW:130,T:'',L:'',P:false,S:s_CSSTop},
        [
          {U:'',T:'Fonds',Show:'alleFonds_Mandant1_Fonds'},
          ...
        ]
      );
        s_add(
        {N:'alleFonds_Mandant1_Fonds',LV:5,MinW:130,T:'',L:'',P:false,S:s_CSSTop},
          [
            {U:'',T:'Fonds 1',Show:'Fonds1_SingleblattGruppen'},
            ...
          ]
        );

s_add(
  {N:'FondsStart',LV:1,MinW:150,T:200,L:170,P:true,S:s_CSSTop,B:'#FFFFFF',BC:'#DBDCEF #4A49A8 #4A49A8 #DBDCEF'},
  [
    {U:'',Show:'Fondsauswahl',T:'Fondsauswahl'}
  ]
);
  s_add(
  {N:'Fondsauswahl',LV:5,MinW:130,T:'',L:'',P:false,S:s_CSSTop},
    [
      {U:'',T:'Fonds 1',Show:'Fonds1_SingleblattGruppen'},
      ...
    ]
  );

s_add(
{N:'Fonds1_SingleblattGruppen',LV:6,MinW:130,T:'',L:'',P:false,S:s_CSSTop},
  [
    {U:'',T:'SingleblattGr 1',Show:'Fonds1_SingleblattGruppe1'},
    ...
  ]
);
  s_add(
  {N:'Fonds1_SingleblattGruppe1',LV:7,MinW:130,T:'',L:'',P:false,S:s_CSSTop},
    [
      {U:'dummy.php',T:'Singleblatt 1'},
      ...
    ]
  );


as you can see, there are 2 different menus (Fondsauswahl and alleFonds_Mandant1_Fonds) with different level using the same submenu (Fonds1_SingleblattGruppen).
but because Fonds1_SingleblattGruppen do not have the correct Level for menu Fondsauswahl, it don't work correct.

so i tried to edit the source to make my problem work correct.
here are my sources: --> http://www.hosticus.com/ExtSubMenu.zip
look for the function "s_ss".
i added a param (pParentLV)

i don't know, if this is the correct way without any side effect to solve my problem, but my sample (--> http://www.hosticus.com/extsubmenu)works fine.
maybe there are some other user, who need this feature.


Author: phk

Date: 3 Jun 2005 10:31 am

i found a better way to solve my problem.

search for function "s_ss"
then search for
Code:

function s_ss(a,b,c){
  ...
  S=s_[a][0];
  o=s_getO("s_m"+b+"_"+c);
  ...
}

in this function and edit it, that it looks like this:
Code:

function s_ss(a,b,c){
  ...
  S=s_[a][0];
  if(S.LV!=(M.LV+1))S.LV=M.LV+1;
  o=s_getO("s_m"+b+"_"+c);
  ...
}


so nothing else has to be changed.


Author: smartmenus

Date: 3 Jun 2005 4:00 pm

phk, this is really an interesting issue. I will take a closer look at your post tomorrow when I have some more free time.

Thanks a lot for your insights! :)