Well the color is to highlight the menu for which page we are in at the
moment and this is determined by a url variable...

Pat 

-----Original Message-----
From: Jochem van Dieten [mailto:[EMAIL PROTECTED] 
Sent: February 24, 2005 13:07
To: CF-Talk
Subject: Re: Trying to optimize some code

CFDEV wrote:
>  
> I have an include for a dynamic side menu and there is a lot of data 
> in the menus. There is 3 level of menus and hte guy who programmed it 
> made loops inside of loops with different queries. I'm looking for a 
> way to optimize this since it's taking 1000 ms to load.
>  
> I looked at the cache options but it's not really an option since the 
> color of the menu change from a variable in the url.

The color is something you could put in a stylesheet. Then the query and the
HTML for the menu is the same all the time, you just include a few lines of
different CSS with each page.


> query menu
>  
> loop over menu
>  
>     query submenu for this menu
>  
>         if there is submenu
>  
>             loop over sub menu
>  
>                 query subsubmenu for this submenu
>  
>                     if there is subsubmenu
>  
>                         loop over subsubmenu

This looks like something you could do in one query using outer joins.

Jochem



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:196359
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to