RE: Recursion and Breadcrumbs

2003-12-03 Thread Andre Turrettini
Jake, I did something that might help you.Its a recursive function that
uses one db call.You can see it at work by creating an account and
creating a survey here.www.surveys.theanticool.com
http://www.surveys.theanticool.com .The interface to create the survey
uses only ie at this point(I know I know!).You can see the results of the
nested tree structure as the shape of the survey.Check it out and write
back to me at [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]if you want
more details.I'll get back to you tonight.

 
DRE

-Original Message-
From: Jake . [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 25, 2003 1:22 PM
To: CF-Talk
Subject: Re:Recursion and Breadcrumbs

Really need a dynamic, DB driven solution. I will check out that site
though.

Jake

if ur using dw then just use an extension, takes 5 seconds to do. or once
again go to www.dwfaq.com and go to snippetts and massimo has a few
breadcrumb snippetts there 
_
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: Recursion and Breadcrumbs

2003-11-25 Thread Dominik Schlaepfer
Hi Jake

There is an article about recursion from Steve Majewski on defusion.com. I think this article answers your questions.
http://www.defusion.com/articles/index.cfm?ArticleID=63

HTH 

Dominik

-Original Message-
From: Jake McKee [mailto:[EMAIL PROTECTED]
Sent: Monday, November 24, 2003 7:51 PM
To: CF-Talk
Subject: Recursion and Breadcrumbs

After searching high and low, I've found quite a few discussions about
using recursion to create breadcrumbs, and other nested categorical
info. It seems to be a pretty common question, and I would expect that
there is a common solution out there, but I can't seem to find one. 

I'm trying to display:

Home  Cat  Sub Cat  Sub Sub Cat  .. Etc.

My DB table looks like :

Cat IDCatNameParentCatID

---

1 CDs0

2 Good CDs1

3 Bad CDs1

4 U22

5 Nsync3

This would display:

Home  CDs  Good CDs  U2

Anyone have a straightforward code snippet for this?

Thanks!
Jake

--

My Blog -http://www.countersinkdg.com www.countersinkdg.com 




 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: Recursion and Breadcrumbs

2003-11-25 Thread Dominik Schlaepfer
Jake

No it does not! In the lower section of the article, just over the source code of the recursive Custom Tag, it is written: To get CFX_MakeTree to put the items in any other order, you would have to completely reorganize your database, and nobody wants to do that.An alternative to hours of swapping ItemID's is to use a small, recursive, custom tag.For example: And here comes your solution without any CFX-Tag.

HTH 

Dominik

-Original Message-
From: Jake . [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 25, 2003 8:36 PM
To: CF-Talk
Subject: Re:Recursion and Breadcrumbs

The problem with that article is that it uses the CF_MakeTree tag, which I'm not able to use. 

Any other ideas?

There is an article about recursion from Steve Majewski on defusion.
com. I think this article answers your questions.
http://www.defusion.com/articles/index.cfm?ArticleID=63

 
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Recursion and Breadcrumbs

2003-11-24 Thread Jake McKee
After searching high and low, I've found quite a few discussions about
using recursion to create breadcrumbs, and other nested categorical
info. It seems to be a pretty common question, and I would expect that
there is a common solution out there, but I can't seem to find one. 

I'm trying to display:

Home  Cat  Sub Cat  Sub Sub Cat  .. Etc.

My DB table looks like :

Cat IDCatNameParentCatID

---

1 CDs0

2 Good CDs1

3 Bad CDs1

4 U22

5 Nsync3

This would display:

Home  CDs  Good CDs  U2

Anyone have a straightforward code snippet for this?

Thanks!
Jake



--

My Blog -http://www.countersinkdg.com www.countersinkdg.com 




 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: Recursion and Breadcrumbs

2003-11-24 Thread Hagan, Ryan Mr (Contractor ACI)
This is what I generally use.Let me know if you need clarification.

cffunction name=list_categories returntype=string output=No
 cfargument name=myCatId type=numeric default=0 required=true

 cfset var currQuery = 
 cfset var returnString = 

 cfquery name=currQuery datasource=#request.dsn.name#
username=#request.dsn.user# password=#request.dsn.pass#
 SELECT catId, parentCatId, catName
 FROM item_categories
 WHERE parentId = #arguments.myCatId# 
 ORDER BY category
 /cfquery

 cfloop query=currQuery
cfset returnString = returnString  catName   gt; 
cfset returnString = returnString  list_categories( Val(currQuery.catId)
)
 /cfloop

 cfreturn returnString

 
/cffunction

-Original Message-
From: Jake McKee [mailto:[EMAIL PROTECTED]
Sent: Monday, November 24, 2003 1:51 PM
To: CF-Talk
Subject: Recursion and Breadcrumbs

After searching high and low, I've found quite a few discussions about
using recursion to create breadcrumbs, and other nested categorical
info. It seems to be a pretty common question, and I would expect that
there is a common solution out there, but I can't seem to find one. 

I'm trying to display:

Home  Cat  Sub Cat  Sub Sub Cat  .. Etc.

My DB table looks like :

Cat IDCatNameParentCatID

---

1 CDs0

2 Good CDs1

3 Bad CDs1

4 U22

5 Nsync3

This would display:

Home  CDs  Good CDs  U2

Anyone have a straightforward code snippet for this?

Thanks!
Jake

--

My Blog -http://www.countersinkdg.com www.countersinkdg.com 


_


 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]