[ic] Mike's Tree Mod - convert into Left Nav Component

Kaare Rasmussen interchange-users@interchange.redhat.com
Mon Apr 22 16:08:00 2002


Hi

> I would like to convert Mike Hein's Tree Mod into a left nav component to
> replace the default left nav in Foundation.

I'm working on that right now. I'm not finished, but it does work correctly 
to the best of my knowledge. I can't figure out how to do an [elsif] to an 
[if-item-param] tag

My category_vertical looks like this:

[comment]
ui_component: category_vertical
ui_component_type: vertical
ui_component_group: Navigation
ui_component_label: Vertical category list

page_class:
	label: Page class
	widget: select
	lookup: which_page
	db: area
	help: Defines which sets of items should be displayed
	advanced: 1

set_selector:
	label: Page area selector
	widget: select
	db: area
	lookup: sel
	help: Defines which sets of items should be displayed
	advanced: 1

timed:
	label: Use timed build
	widget: select
	help: Makes more efficient for large/busy catalogs
	options: 0=No, 5=5 minutes, 10=10 minutes, 20=20 minutes, 60=60 minutes, 
1440=Daily
	advanced: 1
[/comment]

<!-- BEGIN COMPONENT [control component category_vertical] -->
<tr><td align="left" class="categorybar">
  <br>
  <table width="90%" align="center">
[calc]%{$Scratch->{memo}}->{1}=1;return[/calc]
[tree
  start=TOP
  table=tree
  master=parent_fld
  subordinate=child_fld
  autodetect=1
  toggle=toggle
  memo=memo
  spacing=4
  sort=sort
  ]


  <tr>
  [if-item-param parent_fld eq "TOP"]
    <td valign="top" class="categorybar">
      <b>[item-param name]</b>
    </td>
  [else]
    <td class="categorybar">
    [if-item-param mv_level]
      [item-calc]
        return '&nbsp' x [item-param mv_spacing];
      [/item-calc]
    [/if-item-param]
    [if-item-param mv_children]
    [tmp pg][if-item-param page][item-param 
page][else]index[/else][/if-item-param][/tmp]
      <A HREF="[area href="[scratch pg]"
        form='toggle=[item-param code]']">
      [item-calc] $Scratch->{memo}{'[item-code]'} ? '-' : '+' [/item-calc]
      </A>
    [/if-item-param]
    [if-item-param page]
      <A HREF="[area href=[item-param page]]">[item-param name]</A>
    [else]
      [if-item-param text]
      <A HREF="[area href=treeview form='code=[item-param 
code]']">[item-param name]</A>
      [else]
      [page
        search="
        fi=products
        st=db
        bs=1
        tf=sku
        sf=category
        se=[item-param category]
      "][item-param name]</A>
      [/else]
      [/if-item-param]
    [/else]
    [/if-item-param]
  [/else]
  [/if-item-param]
  </td>
  </tr>
[/tree]
</table>
</td>
</tr>
<!-- END COMPONENT [control component category_vertical] -->

-- 
Kaare Rasmussen            --Linux, spil,--        Tlf:        3816 2582
Kaki Data                tshirts, merchandize      Fax:        3816 2501
Howitzvej 75               Åben 12.00-18.00        Web:      www.suse.dk
2000 Frederiksberg        Lørdag 11.00-17.00       Email: kar@kakidata.dk