Re: 3+ Levels of Navigation

This WebDNA talk-list message is from

2006


It keeps the original formatting.
numero = 67813
interpreted = N
texte = I do it with our CMS as well, but what we do is to give each level a level and a number. Then we pass that number from each menue to the next lower one. You can then keep the tree open from to first, second, third, etc. because you know from each menue the level and its id. I know you can code this thus I am not giving you any more information :-) Nitai Steve Craig wrote: > Hi > > Thought I'd better ask this while there are still some people here, > and sorry for anyone willing to help as it's a bit involved. > > For years now I have been using the same basic method for creating my > dynamic site navigation, it has always had a problem that I've known > about but managed to work around - until now! When I create a site > with 3 or more levels of nav then I have problems keeping the nav tree > open. A crappy demo site is here http://cms.asylumweb.net. > > If you click on "Root Level Page" then "A second Level Page" so far so > good but if you click on the third level page the nav closes. > > Basically I use a slight variation on the original sitebuilder code to > create the navigation from a database. The page database is set up > with the following variables... > > PageID PageName RootLevel Rank Related ... and some others > > The PageID is just an ascending number, PageName is what it is, > RootLevel is just a flag to say the page is in the root level of nav, > Rank is there for sort order and Related is used if the page is a > subsection of another page, it stores the PageID of the parent page. > > I am also trying to keep the url's as clean as poss so would prefer > not to be passing any variables. Does anyone know how I could modify > the following code to get it to work or alternatively what method do > you guys use, I would be happy to start again with it just not sure > the best logic to work too. > > I use the following code to make the nav bar, I've also put this > online at the demo site in case the email screws it up. > > [!] ******************** Nav Loop *********************** [/!] > [function name=NavigationLoop] > [showif [ROOTLEVEL]=M] > [text]myMenu=[Middle > StartAfter=/&EndBefore=.][thisURL][/middle][/text] > [/showif] > > [showif [ROOTLEVEL]=] > [search db=admin/MyData.DB&eqPAGENAMEdatarq=[PAGENAME]] > [founditems][text]myMenu=[lookup > db=admin/MyData.DB&lookinfield=PAGEID&value=[related]&returnfield=PAGENAME][/text][/founditems] > > [/search] > [/showif] > > [search > db=admin/-Pages.db&eqMAINNAVdatarq=T&eqRELATEDdatarq=[PAGEID]&RANKtype=number&asRANKsort=1] > > [founditems] > [text]NumSub=[search > db=admin/MyData.DB&eqRELATEDdatarq=[PAGEID]][numfound][/search][/text] > [text]HasSub=[showif [NumSub]=0]F[/showif][showif > [NumSub]>0]T[/showif][/text] > [showif [indent]=1][/showif] > [showif [indent]>1][/showif] > [showif [myMenu]=[PAGENAME]] > [showif [HasSub]=T] > [NavigationLoop indent=[math][indent]+1[/math]] > [/showif] > [/showif] > [/founditems] > [/search] > [/function] > [!] ***************************************************** [/!] > > [showif [ROOTLEVEL]=M] > [text]myMenu=[Middle StartAfter=/&EndBefore=.][thisURL][/middle][/text] > [/showif] > > [showif [ROOTLEVEL]=] > [search db=admin/MyData.DB&eqPAGENAMEdatarq=[PAGENAME]] > [founditems] > [text]myMenu=[lookup > db=admin/MyData.DB&lookinfield=PAGEID&value=[related]&returnfield=PAGENAME][/text] > > [/founditems] > [/search] > [/showif] > > [search > db=admin/MyData.DB&eqMAINNAVdatarq=T&eqROOTLEVELdatarq=M&RANKtype=number&asRANKsort=1] > > [founditems] > [text]NumSub=[search > db=admin/MyData.DB&eqRELATEDdatarq=[PAGEID]][numfound][/search][/text] > [text]HasSub=[showif [NumSub]=0]F[/showif][showif > [NumSub]>0]T[/showif][/text] > [!][/!] > [showif [myMenu]=[PAGENAME]][showif [HasSub]=T][NavigationLoop > indent=1&MenuIndex=[index]][/showif][/showif] > [/founditems] > [/search] > > > Told you it was a bit involved! > > Thanks for any help > ======================================== > Steve Craig - Asylum Interactive Ltd > Tel +44 1330 860550 Fax +44 1330 860880 > ======================================== > http://www.asylumweb.com > Email: steve@asylumweb.com > Skype: s.craig - iChat: steve.craig > ======================================== > > > > > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > > Web Archive of this list is at: http://webdna.smithmicro.com/ -- eBusines Suites simplified. eContentPark - Enterprise Digital Asset Management free of charge eServices - The complete SupportSuite eSurvey - Online Questionnaire made easy Redakto CMS - Content Management that simply works ComputerOil® AG Neugutstrasse 66 8600 Dübendorf / Switzerland Telefon +41 (0)844 44 55 66 info@computeroil.com http://computeroil.com http://econtentpark.com ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
I do it with our CMS as well, but what we do is to give each level a level and a number. Then we pass that number from each menue to the next lower one. You can then keep the tree open from to first, second, third, etc. because you know from each menue the level and its id. I know you can code this thus I am not giving you any more information :-) Nitai Steve Craig wrote: > Hi > > Thought I'd better ask this while there are still some people here, > and sorry for anyone willing to help as it's a bit involved. > > For years now I have been using the same basic method for creating my > dynamic site navigation, it has always had a problem that I've known > about but managed to work around - until now! When I create a site > with 3 or more levels of nav then I have problems keeping the nav tree > open. A crappy demo site is here http://cms.asylumweb.net. > > If you click on "Root Level Page" then "A second Level Page" so far so > good but if you click on the third level page the nav closes. > > Basically I use a slight variation on the original sitebuilder code to > create the navigation from a database. The page database is set up > with the following variables... > > PageID PageName RootLevel Rank Related ... and some others > > The PageID is just an ascending number, PageName is what it is, > RootLevel is just a flag to say the page is in the root level of nav, > Rank is there for sort order and Related is used if the page is a > subsection of another page, it stores the PageID of the parent page. > > I am also trying to keep the url's as clean as poss so would prefer > not to be passing any variables. Does anyone know how I could modify > the following code to get it to work or alternatively what method do > you guys use, I would be happy to start again with it just not sure > the best logic to work too. > > I use the following code to make the nav bar, I've also put this > online at the demo site in case the email screws it up. > > [!] ******************** Nav Loop *********************** [/!] > [function name=NavigationLoop] > [showif [ROOTLEVEL]=M] > [text]myMenu=[Middle > StartAfter=/&EndBefore=.][thisurl][/middle][/text] > [/showif] > > [showif [ROOTLEVEL]=] > [search db=admin/MyData.DB&eqPAGENAMEdatarq=[PAGENAME]] > [founditems][text]myMenu=[lookup > db=admin/MyData.DB&lookinfield=PAGEID&value=[related]&returnfield=PAGENAME][/text][/founditems] > > [/search] > [/showif] > > [search > db=admin/-Pages.db&eqMAINNAVdatarq=T&eqRELATEDdatarq=[PAGEID]&RANKtype=number&asRANKsort=1] > > [founditems] > [text]NumSub=[search > db=admin/MyData.DB&eqRELATEDdatarq=[PAGEID]][numfound][/search][/text] > [text]HasSub=[showif [NumSub]=0]F[/showif][showif > [NumSub]>0]T[/showif][/text] > [showif [indent]=1][/showif] > [showif [indent]>1][/showif] > [showif [myMenu]=[PAGENAME]] > [showif [HasSub]=T] > [NavigationLoop indent=[math][indent]+1[/math]] > [/showif] > [/showif] > [/founditems] > [/search] > [/function] > [!] ***************************************************** [/!] > > [showif [ROOTLEVEL]=M] > [text]myMenu=[Middle StartAfter=/&EndBefore=.][thisurl][/middle][/text] > [/showif] > > [showif [ROOTLEVEL]=] > [search db=admin/MyData.DB&eqPAGENAMEdatarq=[PAGENAME]] > [founditems] > [text]myMenu=[lookup > db=admin/MyData.DB&lookinfield=PAGEID&value=[related]&returnfield=PAGENAME][/text] > > [/founditems] > [/search] > [/showif] > > [search > db=admin/MyData.DB&eqMAINNAVdatarq=T&eqROOTLEVELdatarq=M&RANKtype=number&asRANKsort=1] > > [founditems] > [text]NumSub=[search > db=admin/MyData.DB&eqRELATEDdatarq=[PAGEID]][numfound][/search][/text] > [text]HasSub=[showif [NumSub]=0]F[/showif][showif > [NumSub]>0]T[/showif][/text] > [!][/!] > [showif [myMenu]=[PAGENAME]][showif [HasSub]=T][NavigationLoop > indent=1&MenuIndex=[index]][/showif][/showif] > [/founditems] > [/search] > > > Told you it was a bit involved! > > Thanks for any help > ======================================== > Steve Craig - Asylum Interactive Ltd > Tel +44 1330 860550 Fax +44 1330 860880 > ======================================== > http://www.asylumweb.com > Email: steve@asylumweb.com > Skype: s.craig - iChat: steve.craig > ======================================== > > > > > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > > Web Archive of this list is at: http://webdna.smithmicro.com/ -- eBusines Suites simplified. eContentPark - Enterprise Digital Asset Management free of charge eServices - The complete SupportSuite eSurvey - Online Questionnaire made easy Redakto CMS - Content Management that simply works ComputerOil® AG Neugutstrasse 66 8600 Dübendorf / Switzerland Telefon +41 (0)844 44 55 66 info@computeroil.com http://computeroil.com http://econtentpark.com ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ "Nitai @ ComputerOil"

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

WebMerchant 1.6 and https (1997) WCS Newbie question (1997) Mac & Internet Explorer (2000) [addlineitems] (1997) WebTen? (1997) problems with 2 tags shakur (1997) Proper file locations (1997) https validation (2001) Multi-processor Mac info ... (1997) Re:mac hack (1997) WebCat2b13MacPlugIn - [showif][search][/showif] (1997) Summing a field full of numbers ... (1997) Alcatraz must have been nicer than this... (2000) Problems passing [SKU] with $Replace in 2.0 (1997) Authenticate (1997) (no subject) (1997) [WriteFile] problems (1997) WebMerchant problems (2000) Error: the 'showcart' command requires that you specify a db (1997) No luck with taxes (1997)