Entire solution it seems:

<font face='Verdana, Arial' size='-1'>
  <cfparam name='loop_parent' default='#page_parentid#'>
  <cfparam name='copystring' default=''>
<cfloop from='1' to='10' index='CatID'>
  <cfquery name='loopthrough' datasource='s4s_seniorindex'>
    select * from Categories
    Where CatID=#loop_parent#
  </cfquery>
<cfoutput query='loopthrough'>
 <cfif catid neq #page_parentid#>
<cfset buildstring="<a
href='?mode=#mode#&page_parentid=#Catid#&showpage=browse.cfm'>#category_name
#</a> &gt;&gt; #copystring#">
<cfelse>
<cfset buildstring='<p><font face="Verdana, Arial"
size="4">#Category_Name#</font></p>'>
</cfif>
  <Cfset loop_parent='#parent_id#'>
<cfset copystring="#buildstring#">
</cfoutput>
</cfloop>
<cfoutput>#copystring#</cfoutput>
</font>

Thanks to everyone for all their input, from each message I found some
useful information... the base category system is open to anyone of you who
have replied, free of charge and free of credit...

Thanks,
Tony Hicks
----- Original Message -----
From: Tony Hicks <[EMAIL PROTECTED]>
To: CF-Talk <[EMAIL PROTECTED]>
Sent: Thursday, May 17, 2001 5:44 AM
Subject: HELP: Hierarchy


> I have passed this question through so many cf communities... and it has
still left me
>
> <cf_dumbfounded>
>
> Suppose you have a db with a table called categories..
>
> The fields are:
>
> ID: Each Category's Unique ID
> Parent_ID: This field is the ID of the Parent Category
> Category_Name: The text to display to represent the category...
>
> So when you click a link like this: <a href="browse.cfm?parent_id=5>Test
Category</a> (The unprocessed CF for that is <a
href="browse.cfm?parent_id=#id#>#Category_Name#</a> with a query that tells
it to select just from the parent_id..)...
>
> Well that all works fine but I want to display the Level history at the
top like so:
>
> Companies >> Brick and Mortar >> United States >> Arkansas >> Sevier
County
>
> And if they were on the page listing all the counties in Arkansas it would
be:
>
> Companies >> Brick and Mortar >> United States >> Arkansas
>
> Hopefully you all get the idea... does anyone know what the proper cf code
would be to display this? Allaire Forums have helped me the best they can
but the code people give me either errors out or loops into itself, thus
locking up the server...
>
> Thanks,
> Tony Hicks
>
> I'd be glad to provide as much information as needed.
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to