• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

need help with recursive navigation code

Community Beginner ,
Sep 25, 2006 Sep 25, 2006

Copy link to clipboard

Copied

ok, i am a little frustrated with this so i thought i would post and see if someone can enlighten me.

I have a table that is used for a multi level navigation that is setup like this

CategoryID, CategoryName, ParentID

I would to have a CFC build my navigation in a form like this

Clothes >> T-Shirts >> Cartoons (formated just like this with the >> as a divider for each section)

i have some recursive code already that i use to format the categories in a UL but for the life of me i cant modify the code to build a string like above. Can anyone spur my muse to help me solve this?

thanks
NF

Keep in my that the navigation maybe more than 3 levels deep.
TOPICS
Advanced techniques

Views

194

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 26, 2006 Sep 26, 2006

Copy link to clipboard

Copied

Use cfoutputs grouping feature to loop ofer the query grouped by parent id. output the parent item. The inside that cfoutput use another cfoutput to display each sub item to teh parent.

This should be enough to get you going. Various sorting methods will get your results int eh order you want.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 27, 2006 Sep 27, 2006

Copy link to clipboard

Copied

LATEST
I've got my tinfoil hat on trying to channel your code so I can work out
what's wrong with it, but I'm having no luck.

Perhaps it might just be easier if you post it here...

;-)

--
Adam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation