Ok I have burnt my brain enough on this, and can't seem to get the logic
right. I know I am close but it doesn't seem to work the way it is supposed
to:-)

What I am trying to achieve is simple enough, the below array is static at
the moment but will be created on the fly later. The idea is that first time
use it displays the very top hierarchy as links so you should get.

Research
Analysis
Commentary
Product
Learning
The Team

The clicking on any of the links should then decide to do one of two things,
if its a link to display another page then go of and display this page.
Otherwise it should display the next list of options.

Research
 Australia
 New Zealand
 Asia Pacific
Analysis
Commentary
Product
Learning
The Team

I think you get the general idea, now this is a custom tag that is passed a
variable from the url, which is something like 1-1-2. This is then used to
be able to say this is top position 1, child 1 or position 1 and child 2 of
child 1.

The code for the custom tag is listed below, can anyone see what I am trying
to achieve where I am going wrong and correct it if need be. For the life of
me I can't seem to function to figure this out and it really is driving me
round the bend. maybe the Array isn't right or whatever. I just need a
helping hand to debug this thing:-)



Array:

<cfscript>
Example = ArrayNew(1);
Example[1] = ArrayNew(1);
Example[1][1] = "Research";
Example[1][2] = ArrayNew(1);
Example[1][2][1] = "Australia";
Example[1][2][2] = ArrayNew(1);
Example[1][2][2][1] = "Morning Update";
Example[1][2][2][2] = "Economic Update";
Example[1][2][2][3] = "Weekly Market Update";
Example[1][2][2][4] = "Markets Update (Monthly)";
Example[1][2][2][5] = "ANZ Economic Outlook";
Example[1][2][2][6] = "ANZ Global Economic Update";
Example[1][2][2][7] = "$A Interest Rate Outlook";
Example[1][2][2][8] = "ANZ Job Advertisments";
Example[1][2][2][9] = "ANZ Rural Outlook";
Example[1][2][2][10] = "ANZ Property Outlook";
Example[1][2][2][11] = "Forecasts";
Example[1][2][3] = "New Zealand";
Example[1][2][4] = "Asia Pacific";
Example[2] = ArrayNew(1);
Example[2][1] = "Analysis";
Example[3] = ArrayNew(1);
Example[3][1] = "Commentary";
Example[4] = ArrayNew(1);
Example[4][1] = "Product";
Example[5] = ArrayNew(1);
Example[5][1] = "Learning";
Example[6] = ArrayNew(1);
Example[6][1] = "The Team";
</cfscript>


Code:


<cfparam name="attributes.array" default="" type="array">
<cfparam name="attributes.selected" default="">
<cfparam name="attributes.Level" default=0 type="numeric">

<cfset Example = attributes.array>
<cfset strArray = attributes.selected>
<cfset nLevel = attributes.Level>

<cfif not IsArray(Example)>
        <cfoutput>Error: more detailed information is needed</cfoutput>
        <cfabort>
</cfif>

<cfparam name="blnMenu" default="0">

<cfif nLevel lte ListLen(attributes.selected)>
        <cfif strArray neq "">
                <cfset blnMenu=ListGetAt(attributes.selected,nLevel,"-")>
        </cfif>
</cfif>

<cfoutput>

<cfloop index="item" from=1 to="#ArrayLen(Example)#">
        <a href="index.cfm?menu=#item###research"><img src="arrow_1e.gif"
height="9" width="12" border=0>#Example[item][1]#</a><br>
        <cfif blnMenu eq item>
                <cfif nlevel lte ListLen(attributes.selected,"-")>
                        <cfset NextLevel=nLevel>
                        <cf_cfs_navDisplay array="#Example[item]#"
selected="#menu#" Level="#NextLevel#">
                </cfif>
        </cfif>
</cfloop>
</cfoutput>


regards

Andrew Scott
ANZ eCommerce Centre
* Ph 9273 0693  
* [EMAIL PROTECTED]


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 28 September 2000 06:13
To: CF-Talk
Subject: RE: Cheap CF Hosting FOUND



>
> If you can live without the usual security issue tags (CFFILE, CFOBJECT,
> etc) take look at Dantor.com. $10 / month CF 4.0 hosting (basic account --
> self service everything through a CF interface) on T3s.  Support is about
> average via email, but they do respond and everything works -- I have two
> domains on there servers and I'm pretty happy with them.

Well... since I'm replying to a large backlog of email today anyway, what
the heck....

I "temporarily" parked intrafoundation.com and fourthfoundation.com with
www.paconline.net a year or two ago intending to change over to something
more expensive later on. Frankly, for $25 a month they're not all that bad.
Occasionally ftp or email is unavailable, but usually only for a few
minutes.

Course, I only do about 600 to 700mb of traffic a month, and don't do any
heavy db on them so... that could be completely different.

Mainly I chose them because mainframe.ca was sitting there at the time. And
I thought it was cool to share rackspace with the people who made the "money
for nothing" video. ;-)

--min

----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to