Neal:
i see two things...
1) you're initializing the navArray as a 2d array. It's no longer a 2d
array. I don't necessarily think that would cause any problems...would
likely just give you an empty/null 2nd dimension...but for the sake of
'cleanliness', you should declare it as a 1d array:
application.navArray = arrayNew(1);
Also, when I look at the cfdump being output at http://65.218.34.47/, i see
a structure with a nested array (with nested structures)...but that outer
structure should be nested in an array as well.
In easier terms...you have (hierarchically): blue table -> green table ->
blue table : )
it should be: green table -> blue table -> green table -> blue table
what exactly are you <cfdump>'ing?
Charlie
(ps - hang in there, we'll nail it) : )
----- Original Message -----
From: "Bailey, Neal" <[EMAIL PROTECTED]>
To: "CF-Community" <[EMAIL PROTECTED]>
Sent: Wednesday, April 07, 2004 10:06 AM
Subject: RE: Any CSS guru here?
> Charlie,
>
> Ok here is what I have so far...
> I think I am missing something I am getting lost with the subnav array. It
> kinds of works but when I reload the page it gives an error when it hits
> the second sub link.
>
> ---------------------------------------
> <cflock scope="application" timeout="10" type="exclusive">
> <cfparam name="application.initialized" default="0" />
> <cfset request.initialized = application.initialized />
> </cflock>
>
> <cfif NOT request.initialized>
> <cflock scope="application" type="exclusive" timeout="10">
> <cfscript>
> application.initialized = 1;
> application.root = "http://65.218.34.47/";
> application.pixPath = "http://65.218.34.47/";
> application.rootPath = "xxxxxxxxxxx";
> application.navArray = arrayNew(2);
> </cfscript>
> </cflock>
> </cfif>
>
> <cfif arrayIsEmpty(application.navArray)>
> <!--- this array is declared earlier in the Application.cfm --->
> <cflock scope="application" timeout="10" type="exclusive">
>
> <cfscript>
> // create the array
> application.navArray = arrayNew(1);
>
> // create the page title/template for 'Who Is UGA' in the main nav
> application.navArray[1] = structNew();
> application.navArray[1].title = "Who Is UGA";
> application.navArray[1].template = "who-is-uga.cfm";
>
> // create an array/struct to hold the 'Who Is UGA' sub nav
> application.navArray[1].subNav = arrayNew(1);
> application.navArray[1].subNav[1] = structNew();
>
> // populate the sub nav for the 'Who Is UGA'
> application.navArray[1].subNav[1].title = "Home";
> application.navArray[1].subNav[1].template = "index.cfm";
> application.navArray[1].subNav[2].title = "UGA History";
> application.navArray[1].subNav[2].template = "history.cfm";
> application.navArray[1].subNav[3].title = "UGA Today";
> application.navArray[1].subNav[3].template = "ugatoday.cfm";
> application.navArray[1].subNav[4].title = "Our Mission";
> application.navArray[1].subNav[4].template = "mission.cfm";
> application.navArray[1].subNav[5].title = "The Products";
> application.navArray[1].subNav[5].template = "products.cfm";
> application.navArray[1].subNav[6].title = "The Future of UGA";
> application.navArray[1].subNav[6].template = "future.cfm";
> </cfscript>
> </cflock>
> </cfif>
>
> <!--- shift the application scope into the request scope --->
> <cflock scope="application" type="readonly" timeout="10">
> <cfset request.app = duplicate(application)>
> </cflock>
> -----------------------------------
>
> I appreciate this, thanks a ton...
>
> Neal Bailey
> Internet Marketing Manager
> E-mail: [EMAIL PROTECTED]
>
> ________________________________________
> From: Charlie Griefer [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, April 07, 2004 9:39 AM
> To: CF-Community
> Subject: Re: Any CSS guru here?
>
> btw Neal...I happened to notice you're both dumping the array, but also
> getting an error. Notice that the code below is a 1d array with nested
> structs, whereas the previous code i gave you was a 2d array.
>
> essentially, instead of putting the page title in dimension 1 and the
> template name in dimension 2, I put a structure in dimension 1, and the
> relevant information in the structure.
>
> So where it used to be:
>
> navArray[1][1] = "About Us";
> navArray[1][2] = "about.cfm";
>
> it is now:
>
> navArray[1].title = "About Us";
> navArray[1].template = "about.cfm";
>
> by the time we're finished here, you should be pretty comfortable with
> arrays and structs, i think : )
>
> ----- Original Message -----
> From: "Charlie Griefer" <[EMAIL PROTECTED]>
> To: "CF-Community" <[EMAIL PROTECTED]>
> Sent: Wednesday, April 07, 2004 8:03 AM
> Subject: Re: Any CSS guru here?
>
> > for that I might get fancy with nested structs and arrays...
> >
> > // create the array
> > navArray = arrayNew(1);
> >
> > // create the page title/template for 'Who Is UGA' in the main nav
> > navArray[1] = structNew();
> > navArray[1].title = "Who Is UGA";
> > navArray[1].template = "who-is-uga.cfm";
> >
> > // create an array/struct to hold the 'Who Is UGA' sub nav
> > navArray[1].subNav = arrayNew(1);
> > navArray[1].subNav[1] = structNew();
> >
> > // populate the sub nav for the 'Who Is UGA'
> > navArray[1].subNav[1].title = "Home";
> > navArray[1].subNav[1].template = "index.cfm";
> > navArray[1].subNav[2].title = "UGA History";
> > navArray[1].subNav[2].template = "history.cfm";
> > navArray[1].subNav[3].title = "UGA Today";
> > navArray[1].subNav[3].template = "ugatoday.cfm";
> > navArray[1].subNav[4].title = "Our Mission";
> > navArray[1].subNav[4].template = "mission.cfm";
> > navArray[1].subNav[5].title = "The Products";
> > navArray[1].subNav[5].template = "products.cfm";
> > navArray[1].subNav[6].title = "The Future of UGA";
> > navArray[1].subNav[6].template = "future.cfm";
> >
> > etc.
> >
> > that might look a bit confusing, but if you type it out and <cfdump> it
it
> > should make MUCH more sense. Of course, it's also just before 8:00 am
> here
> > and I still haven't seen the bottom of my coffee cup, so this could be a
> > bunch of gibberish : )
> >
> > charlie
> >
> >
>
>
>
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
- RE: South Park Character Generator Erika L Walker-Arnold
- RE: South Park Character Generator C. Hatton Humphrey
- RE: South Park Character Generator Philip Arnold
- RE: South Park Character Generator Paul Ihrig
- Caricom calls for investigation int... Angel Stewart
- RE: Any CSS guru here? Bailey, Neal
- Re: Any CSS guru here? Charlie Griefer
- Re: Any CSS guru here? Charlie Griefer
- RE: Any CSS guru here? Bailey, Neal
- RE: Any CSS guru here? Bailey, Neal
- RE: Any CSS guru here? Charlie Griefer
- RE: Any CSS guru here? Bailey, Neal
- Re: Any CSS guru here? Charlie Griefer