> I have found the qNav query and the cfloop that spits it out > (dmHeader.cfm)... I would grateful if someone could share their > implementation, in howto fashion, of implmenting dropdown menus and the > dynamic population based site hierarchy.
Well - we haven't implemented drop-down menus for our new site (coming soon) but we have implemented our own code to draw our nested menus. And there are so many different Javascript menu systems that it would be difficult to roll a one-size-fits-all how-to. But, for getting descendents (of any nominated node) you would call getDescendants. This takes the objectID of any specific navigation node you want the descendents for. For the "current" page navigation ID, this would give you all the descendants. You would then just loop through those to get the next level down, etc. What you may want to consider doing is just doing this once (for the whole nav tree) and populating a set of structures in your Application scope and then displaying your menu from that. You would probably also want to look at some mechanism of caching this so you didn't always have to go back to the database for every call. You might want to look at the <skin:cache> (your prefix might be different for this tag) tag for this. The main key when working with the data that is returned from the FarCry tree object is the nLevel field. This is what tells you what level the menu item is at in the tree. The other useful fields are: objectID objectName parentID For creating a "breadcrumb" you should look at getting a query back from getAncestors. Again, this takes the objectID of any specific navigation node you want the ancestors for. Same sorts of fields are useful but the records are in order from highest to lowest in the tree and only contain the nodes required to get to that point. There is a 'breadcrumb.cfm" in the webskin tags directory. The other useful thing that I always use is the <skin:buildlink> tag (the prefix is dependent on what you use in your <CFIMPORT> (check out the source code for examples). This helps you not worry about what the actual URL is for each link you want to produce - just supply the objectID and you are away. The other thing that has helped me a lot in understanding how to work with the general tree routines is the "/farcry/farcy_core/tags/navajo" and "/farcry/farcry_core/tags/webskin" directories. NOTE: don't modify these - just use them to learn. The only other thing I can suggest is liberal use of <CFDUMP> while you are developing and it becomes pretty obvious how the schema works. Hope this helps. Gary Menzel Web Development Manager IT Operations Brisbane -+- ABN AMRO Morgans Limited Level 29, 123 Eagle Street BRISBANE QLD 4000 PH: 07 333 44 828 FX: 07 3834 0828 **************************************************************************** If this communication is not intended for you and you are not an authorised recipient of this email you are prohibited by law from dealing with or relying on the email or any file attachments. This prohibition includes reading, printing, copying, re-transmitting, disseminating, storing or in any other way dealing or acting in reliance on the information. If you have received this email in error, we request you contact ABN AMRO Morgans Limited immediately by returning the email to [EMAIL PROTECTED] and destroy the original. We will refund any reasonable costs associated with notifying ABN AMRO Morgans. This email is confidential and may contain privileged client information. ABN AMRO Morgans has taken reasonable steps to ensure the accuracy and integrity of all its communications, including electronic communications, but accepts no liability for materials transmitted. Materials may also be transmitted without the knowledge of ABN AMRO Morgans. ABN AMRO Morgans Limited its directors and employees do not accept liability for the results of any actions taken or not on the basis of the information in this report. ABN AMRO Morgans Limited and its associates hold or may hold securities in the companies/trusts mentioned herein. Any recommendation is made on the basis of our research of the investment and may not suit the specific requirements of clients. Assessments of suitability to an individual's portfolio can only be made after an examination of the particular client's investments, financial circumstances and requirements. **************************************************************************** --- You are currently subscribed to farcry-dev as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia http://www.mxdu.com/ + 24-25 February, 2004
