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

Output issue while grouping

New Here ,
Aug 10, 2008 Aug 10, 2008
OK guys... I have written a dynamic hierarchial menu that uses CSS. My issue is that I have 6 main menu items and each item has submenus. I have it ready to go in theory, but my cfoutput keeps repopulating the first entry.


I am hoping someone can help ASAP. I have 6 of the same thing.

JG
2.7K
Translate
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

correct answers 1 Correct answer

Valorous Hero , Aug 11, 2008 Aug 11, 2008
jgethers wrote:
> It works well, except it doesnt output 2 3 4 5 6.

It never retrieves them in the first place. That is the problem, not the output.

Are there actually pagecontent records for parentID values 2, 3, 4, 5 and/or 6? If not, those those menu items will not appear in the results because you are using an INNER JOIN.

Try changing the INNER JOIN to a LEFT JOIN. That will include all records from the left hand table (ie cssmenu) even if there are no matching records in pagecontent ....
Translate
Valorous Hero ,
Aug 11, 2008 Aug 11, 2008
If an mID has no matching child records then the pName will be null. You can use cfif to generate the <div></div> tags, and links, only when the child value is not emtpy string.

Translate
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
New Here ,
Aug 11, 2008 Aug 11, 2008
ok I will try that.
Translate
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
New Here ,
Aug 11, 2008 Aug 11, 2008
LATEST
SWEET! It works. Now I just have to get the CSS to work right in Firefox.

Thanks Man!
Translate
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