User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ColdFusion section within the Web Development category of DaniWeb, a massive community of 361,630 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,166 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ColdFusion advertiser:
Views: 718 | Replies: 3
Reply
Join Date: Mar 2008
Posts: 2
Reputation: mollypepperpot is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
mollypepperpot mollypepperpot is offline Offline
Newbie Poster

cfloops

  #1  
Mar 15th, 2008
I'm trying to make a list of sub titles that links to mid topic jumps on another page. As the sub titlles are the same for each main title and the midtopic jumps increment numerically- I thought I could use cfloop - but I can't get it to work - either my titles all have to be the same or my links all have to be the same.... can anyone help??
I tried using nested loops but that made it worse as the inner loop had to loop through before the outer loop ... hope that makes sense!!! Can someone help me??

As you may have guessed - I'm a noobie so I would be grateful for any suggestions
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Feb 2008
Posts: 54
Reputation: cmhampton is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 6
cmhampton's Avatar
cmhampton cmhampton is offline Offline
Junior Poster in Training

Re: cfloops

  #2  
Mar 18th, 2008
Are you outputting from a query?

If so you can use the group attribute of the cfoutput tag. Here's an example:

  1. <cfoutput query="queryname" group="title">
  2. #Title#
  3. <cfoutput>
  4. #SubTitle#<br />
  5. </cfoutput>
  6. </cfoutput>

This would ouput the following:

Title1
Subtitle1
Subtitle2
Subtitle3
Title2
Subtitle1
Subtitle2
Title3
Subtitle1

Post some of your code and I'll have a look at it.
Reply With Quote  
Join Date: Mar 2008
Posts: 2
Reputation: mollypepperpot is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
mollypepperpot mollypepperpot is offline Offline
Newbie Poster

Re: cfloops

  #3  
Mar 18th, 2008
Thanks this was really helpful, I got so bogged down with cflooping that I didn't think to try looking at it differently!!!
Reply With Quote  
Join Date: Feb 2008
Posts: 54
Reputation: cmhampton is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 6
cmhampton's Avatar
cmhampton cmhampton is offline Offline
Junior Poster in Training

Re: cfloops

  #4  
Mar 18th, 2008
Glad to help. Let me know if you have any other questions.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb ColdFusion Marketplace
Thread Tools Display Modes

Other Threads in the ColdFusion Forum

All times are GMT -4. The time now is 6:44 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC