navigation issue. I also thought I'd follow up for the benefit of anyone
else building CF navigation.
****Tom Kitta
That is quite complex navigation you got there. Do your navigation links
change so much? How about using a database to populate your navigation or
XML based menus?
****
You were right, Tom, I switched to a database solution and the logic was
MUCH simpler. I guess I originally started out storing everything in arrays
because I didn't think I'd be storing a lot of information, I figured the
information would change infrequently, and I didn't count on the need to
create relationships between the various pieces of information. It made
infinitely more sense to have database tables for primary, secondary, and
tertiary nav.
****Barney Boisvert
You can pretty much remove all your evaluate() calls and replace with struct
references if you're on CFMX. I'm not sure about the scope of all your
variables, so I can't give you specific solutions, but here are some ideas
to get you started.
evaluate("request.arnav#request.subnav#")
is the same as this
request["arnav#request.subnav#"]
evaluate("#thissection#[LinkDetail][1]")
is the same as this (assuming the variable name stored in 'thissection' is
in the 'variables' scope)
variables[thissection]["linkDetail"][1]
****
Wow, you completely blew my mind with this one! I knew that
structures/arrays were supposed to be the solution to the evaluate()
problem, but I thought that meant having to actually create the structures
each time I needed them, which turned out to be impossibly painful at times.
When I plugged in your code, it worked like a charm. I didn't realize that
all scopes are structures now. This is fantastic, and the code runs much
faster.
Thanks guys!
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

