Ok I think I have it working but for some reason when I upload my
Aplication.cfm file it's not taking my new changes. It's driving me crazy. I
have had this happen before and all I did was kill the session but this does
not work. I am figuring that it has cashed my application file, is this a cf
issue or bug or does it have anything to do with cflock?


Thanks for the help...


Neal Bailey
Internet Marketing Manager
E-mail:  <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]


  _____  

From: Charlie Griefer [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 06, 2004 3:32 PM
To: CF-Community
Subject: Re: Any CSS guru here?


Hi Neal:

The array is declared in the following block of code (within the
Application.cfm file):

<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://charlie.griefer.com/";
        application.pixPath  = "http://www.griefer.com/charlie/pix/";
        application.rootPath = "xxxxxxxxxxx";
        application.navArray = arrayNew(2);
   </cfscript>
  </cflock>
</cfif>

At the bottom of my Application.cfm I copy the whole application scope into
the request scope.  I've heard conflicting theories on whether or not this
is a 'good' practice, but I like it since it relives worry about having to
lock vars throught the site :)

<!--- shift the application scope into the request scope --->
<cflock scope="application" type="readonly" timeout="10">
  <cfset request.app = duplicate(application)>
</cflock>

Let me know if that does it for you (also feel free to ask any questions you
might have about the tutorials) :)

Charlie

----- Original Message -----
From: "Bailey, Neal" <[EMAIL PROTECTED]>
To: "CF-Community" <[EMAIL PROTECTED]>
Sent: Tuesday, April 06, 2004 2:21 PM
Subject: RE: Any CSS guru here?

> Thanks Charlie again...
>
> I have it all set up but I keep getting an error stating that NAVARRAY is
> undefined but I think I have it defined. Could you tell me how you
declared
> you're array so that I see if I am doing it right (probably not)? I'm not
so
> good with arrays. Actually I have been going through some array tutorials
> and noticed that they were written by you so I guess I'm talking to the
> right guy. Lol...
>
> Thanks for all your help...
>
> Neal Bailey
> Internet Marketing Manager
> E-mail:  <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
>
>   _____
>
> From: Charlie Griefer [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 06, 2004 2:31 PM
> To: CF-Community
> Subject: Re: Any CSS guru here?
>
> Neal:
>
> No problem.  But Sandy's gonna yell at me for using tables : )
>
> In the Application.cfm, I create an array that holds the navigation
> elements:
> <cfif arrayIsEmpty(application.navArray)>  <!--- this array is declared
> earlier in the Application.cfm --->
>   <cflock scope="application" timeout="10" type="exclusive">
>    <cfscript>
>     temp = arrayResize(application.navArray, 5);
>
>     application.navArray[1][1] = "home page";
>     application.navArray[1][2] = "";
>
>     application.navArray[2][1] = "about charlie";
>     application.navArray[2][2] = "about/";
>
>     application.navArray[3][1] = "resum&eacute;";
>     application.navArray[3][2] = "resume/";
>
>     application.navArray[4][1] = "code samples";
>     application.navArray[4][2] = "code/";
>
>     application.navArray[5][1] = "photos";
>     application.navArray[5][2] = "photos/";
>    </cfscript>
>   </cflock>
> </cfif>
>
> The custom tag is called as:
> <cfmodule
>    template="_lib/inc/nav.cfm"
>    page="home page"
> >
>
> where the 'page' attribute matches the 2nd dimension of the navArray.
>
> for nav.cfm, I've put the code up at
> http://charlie.griefer.com/_lib/inc/nav_code.cfm (figured it would be much
> easier to read than in a word-wrapping email client).
>
> let me know if you have any questions.
>
> Charlie
>
> ----- Original Message -----
> From: "Bailey, Neal" <[EMAIL PROTECTED]>
> To: "CF-Community" <[EMAIL PROTECTED]>
> Sent: Tuesday, April 06, 2004 1:11 PM
> Subject: RE: Any CSS guru here?
>
> > Charlie,
> >
> > Thanks for your help with this... you wouldn't happen to have a code
> example
> > of your navigation would ya. I really like the way it works. The way I
> have
> > it working now is that it passes a variable in the url but this seems
kind
> > of messy. Yours is cleaner and I could probably learn something from it.
> >
> > Thanks...
> >
> > Neal Bailey
> > Internet Marketing Manager
> > E-mail:  <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
> >
> >   _____
> >
> > From: Charlie Griefer [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, April 06, 2004 12:47 PM
> > To: CF-Community
> > Subject: Re: Any CSS guru here?
> >
> > Neal:
> >
> > check out http://charlie.griefer.com/.  The nav is nowhere near as fancy
> as
> > what you have, but I think the concept is the same as what you want.  If
> you
> > click on 'About', the 'About' stays highlighted.
> >
> > what I do there is put the navigation into a custom tag.  When I call
it,
> I
> > pass the current page as a tag attribute.  Within the tag itself, I loop
> > over an array (held in the application scope that holds structures
> > containing the 'display name' and target of each navigation element),
and
> a
> > conditional within each to determine whether or not the display name
> matches
> > the 'current page' attribute.  If match, no <a href> and set background
> > color to 'active'.  Otherwise, include the href and the appropriate CSS
> > (including the hover).
> >
> > Charlie
> >
> >
> >
>   _____
>
>
>
>
  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to