Don't think it's a scope thing. Here's the whole code of the loop:
<cfloop query="qryGetParentNavigation">
<!--- Find children of the current parent --->
<cfquery name="qryGetChildNavigation">
SELECT
FROM
WHERE Navigation=1 AND
ParentSystemLocationID=#qryGetParentNavigation.SystemLocationID#
</cfquery>
<!--- Insert Navigation Item into Array
Attribute 1 = Navigation Name
Attribute 2 = Navigation ID
Attribute 3 = return EmptyLocation,
which indicates if clicking the link results ingoing to
a page
(1=empty, 0=clickable)
Attribute 4 = Navigation Parent ID
Attribute 5 = Navigation Order
--->
<cfset
attributes.NavigationArray[#attributes.NavigationItemNumber#][#attributes.NavigationAttributeNumber#]
= qryGetParentNavigation.SystemLocationName>
<cfset attributes.NavigationAttributeNumber =
attributes.NavigationAttributeNumber + 1>
<cfset
attributes.NavigationArray[#attributes.NavigationItemNumber#][#attributes.NavigationAttributeNumber#]
= qryGetParentNavigation.SystemLocationID>
<cfset attributes.NavigationAttributeNumber =
attributes.NavigationAttributeNumber + 1>
<cfset
attributes.NavigationArray[#attributes.NavigationItemNumber#][#attributes.NavigationAttributeNumber#]
= qryGetParentNavigation.EmptyLocation>
<cfset attributes.NavigationAttributeNumber =
attributes.NavigationAttributeNumber + 1>
<cfset
attributes.NavigationArray[#attributes.NavigationItemNumber#][#attributes.NavigationAttributeNumber#]
= qryGetParentNavigation.ParentSystemLocationID>
<cfset attributes.NavigationAttributeNumber =
attributes.NavigationAttributeNumber + 1>
<cfset
attributes.NavigationArray[#attributes.NavigationItemNumber#][#attributes.NavigationAttributeNumber#]
= qryGetParentNavigation.SystemLocationOrder>
<cfset attributes.NavigationItemNumber =
attributes.NavigationItemNumber + 1>
<cfset attributes.qryGetNavigationIndexNo =
attributes.qryGetNavigationIndexNo + 1>
A: <cfoutput>#attributes.qryGetNavigationIndexNo#
(#qryGetChildNavigation.RecordCount#): </cfoutput><cfdump
var="#attributes.NavigationArray#">
<!--- If there is a child for the parent, call the recurse tag again,
but
this time make the parentitemid equal to the itemid of the current
child item. Increase the level by 1. --->
<cfif qryGetChildNavigation.RecordCount GT 0>
<cf_tag_navigationarraybuild
ParentItemID =
"#qryGetParentNavigation.SystemLocationID#"
NavigationArray = "#attributes.NavigationArray#"
NavigationItemNumber =
"#attributes.NavigationItemNumber#"
NavigationAttributeNumber = "1"
HasPermissionForCurrentLocation =
"#attributes.HasPermissionForCurrentLocation#"
sqlSystemLocationWhereClause =
"#attributes.sqlSystemLocationWhereClause#"
qryGetNavigationIndexNo =
"#attributes.qryGetNavigationIndexNo#"
TimesHittingB = "#attributes.TimesHittingB#">
</cfif>
B<cfoutput>(#attributes.TimesHittingB#):
#attributes.qryGetNavigationIndexNo#
(#qryGetChildNavigation.RecordCount#): </cfoutput><cfdump
var="#attributes.NavigationArray#">
<cfset attributes.TimesHittingB = attributes.TimesHittingB + 1>
</cfloop>
On 5/21/05, Sean Corfield <[EMAIL PROTECTED]> wrote:
> All your local variables need to be declared with var - including the
> query name.
>
> On 5/20/05, Chad Renando <[EMAIL PROTECTED]> wrote:
> > Hopefully, one of you other weekend warriors can help, else I'll have
> > to wait 'till Monday...
> >
> > I have a recursive custom tage I use to build my navigation. It goes
> > like so (shortened to get the point across):
> >
> > cfparam "ParentID" "0"
> >
> > Query "ReturnParent" (Where ID=ParentID)
> >
> > <cfloop query="ReturnParent">
> >
> > Query "CheckForChild"
> >
> > Build NavigationArray
> > <!--- Testing variable: A: Number of times run + 1
> > (CheckForChild.RecordCount)
> > cfdump NavigationArray --->
> > If CheckForChild.RecordCount GT 0
> > cf_buildnavigation ParentID="ReturnParent.ID"
> > /If
> > <!--- Testing variable: B(Number of times at point B): Number of
> > times run + 1 (CheckForChild.RecordCount)
> > cfdump NavigationArray --->
> > </cfloop>
> >
> > I have output the results of test points A and B at the bottom of the
> > email. You'll see the problem is that the navi8gation gets built fine
> > at the second point A, as well as the first point B. But for some
> > reason, no matter what happens in the middle, the contents of the
> > array end up being that of the first time through the tag.
> >
> > Hope it makes sense...
> >
> > Chad
> > who is watching Teamo Supreamo while coding
> >
> > A: 2 (1):
> > 1
> > 1 Home
> >
> > A: 3 (0):
> > 1
> > 1 Home
> >
> > 2
> > 1 Manage System Locations
> >
> > B(1): 3 (0):
> > 1
> > 1 Home
> >
> > 2
> > 1 Manage System Locations
> >
> > B(1): 2 (1):
> > 1
> > 1 Home
>
> ---
> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to [EMAIL PROTECTED]
> Aussie Macromedia Developers: http://lists.daemon.com.au/
>
---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/