/t5/coldfusion-discussions/output-issue-while-grouping/td-p/861339Aug 10, 2008
Aug 10, 2008
Copy link to clipboard
Copied
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.
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 ....
/t5/coldfusion-discussions/output-issue-while-grouping/m-p/861364#M79428Aug 11, 2008
Aug 11, 2008
Copy link to clipboard
Copied
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.