What is WebDNA

WebDNA is a scripting and database system designed to easily build web applications.

WebDNA and BioType

BioType service is a biometric keystroke dynamic system. It will be part of WebDNA 8.5

Download WebDNA

Download WebDNA freeware, try it and register later if you want.

WebDNA resources

The list of all WebDNA instructions.
WebDNA
Software Corporation
Search WebDNA Site
 Menu


HOME


DOWNLOADS


LEARN


EDUCATION


NEWS


COMMUNITY


STORE


SUPPORT


CONTACT

3+ Levels of Navigation

This WebDNA talk-list message is from

2006


It keeps the original formatting.
numero = 67812
interpreted = N
texte = 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... PageIDPageNameRootLevelRankRelated... 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&asRANKso rt=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/ Associated Messages, from the most recent to the oldest:

    
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... PageIDPageNameRootLevelRankRelated... 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&asRANKso rt=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/ Steve Craig

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:

[date] for today's date, while inside old order file (1998) serial number generation (1997) GuestBook example (1997) [TaxableTotal] - not working with AOL and IE (1997) Sub Totals (2000) Stats (2004) Protect vs Authenicate (1997) WebCat2b13MacPlugIn - [shownext method=post] ??? (1997) 2.0 Info (1997) Multiple prices (1997) [SearchString] problem with [search] context (1997) Nesting format tags (1997) WebCat2 - Getting to the browser's username/password data (1997) Color options for items (1999) list problems (digest) (1998) Cart Question (1998) WebCatalog can't find database (1997) External Images (1998) Frames and WebCat (1997) Email within tmpl ? (1997)