Solved it myself, I think. I found this:
http://www.dreamincode.net/forums/index.php?s=7408f77eb1a86f20d63b797d73181792&showtopic=15185
The code shown there required some rejiggering for the
menubar formatting.
First I created this .cfc file:
<cfcomponent displayname="categories"
bindingname="categories">
<cffunction name="getCats" access="public"
returntype="string">
<cfargument name="parentid" type="numeric" required="no"
default="0">
<cfquery name="qCats" datasource="DSN">
SELECT catid, name, parentid FROM tablecategory WHERE
parentid = #arguments.parentid# ORDER BY name
</cfquery>
<!--- Create Output --->
<cfset output = "">
<!--- Loop over all items --->
<cfloop query="qCats">
<cfset childoutput = "">
<!--- Check Children of this item --->
<cfif qCats.recordcount GT 0>
<cfset childoutput = "#CreateObject('component',
'categories').getCats(qCats.catid)#">
</cfif>
<cfif #childoutput# CONTAINS "<a">
<cfset output = "#output# <li><a
class=""MenuBarItemSubmenu""
href=##>#qCats.name#</a><ul>#childoutput#</ul></li>">
<cfelse>
<cfset output = "#output#
<li><a>#qCats.name#</a></li>">
</cfif>
</cfloop>
<cfreturn output />
</cffunction>
</cfcomponent>
In my .cfm file I inserted a menu bar and changes the code
to:
<ul id="MenuBar1" class="MenuBarHorizontal">
<cfoutput>
#CreateObject('component', 'categories').getCats(0)#
</cfoutput>
</ul>
Seems to work fine except it creates a ton of whitespace. Not
sure why, but I'm sure I can find a solution.