I am trying to understand the rendering of the categories includelet in xowiki so that I can write a new TreeRenderer to support yuimenubar from existing markup, but am having trouble finding my way around.
My includelet declaration is as follows:
{{categories -decoration plain -style samplemenu -order_items_by page_order,asc}}
My categories includelet is rendered like this (abridged):
<!-- Menu Start -->
<div class='categories'>
<h3>Contents </h3>
<ul class='menu' id='xotcl::___R-Contents'>
<li class='menu-closed'><span > </span>
<div class='submenu'>
<ul >
<li class='menu-closed'><span > SubMenu</span>
<div class='submenu'>
<ul >
<li class='liItem'><a href='/item1'>Item 1</a></li>
<li class='liItem'><a href='/item2'>Item 2</a></li>
</ul>
</div>
</ul>
</div>
</li>
</ul>
</div>
<!-- Menu End -->
I thought I had found the piece of code that actually renders this but am becoming very frustrated by my lack of success!
I have tried adding edifying flags such as "BOO!" and "GOTCHA!" to the code in the following locations with no success whatsoever:
- categories instproc render
It seems that even when I hard-code the return value, the result does not appear in my page source. I can only conclude that the categories includelet is not rendered by its own render method.
- TreeRenderer create TreeRenderer=samplemenu
I have tried editing the css class applied in 'TreeRenderer=samplemenu proc render {tree}' but this change is not reflected in the displayed page source after page refresh. I have confirmed several times that the file is being watched and have browsed the modified code in the xotcl code browser.
- menu-procs.tcl
I have studied this file for any evidence of procs that might be involved, but this file seems to contain procs that support creating menus using the YUI javascript API rather than from existing markup as I want to do.
I would also like to find the piece of code that wraps the categories content in:
<div class='categories'><h3>Contents </h3>
because try as I might I cannot seem to find it.
I realise that this may come down to me just being really really dumb, but I have to ask because I'm getting nowhere fast!
Regards
Richard