[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Foundation Enhancements..
I wanted to post some this subcategory enhancement I kindof hacked
together.. Can someone make this work a little better then it currently
does? I'm not sure if I went about it the right way since I've noticed that
the toggle switch doesn't make the subcategories expand if I'm logged into
the admin interface.
[comment]
ui_component: category_vert_toggle
ui_component_type: vertical
ui_component_group: Navigation
ui_component_label: Collapsable 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
toggleswitchon:
label: Toggle Open Switch
widget: text
help: Image to use for opening a category, leave blank to leave default +
advanced: 1
toggleswitchoff:
label: Toggle Closed Switch
widget: text
help: Image to use for closing a category, leave blank to leave default -
advanced: 1
[/comment]
<tr><td align="left" class="categorybar">
<br>
<table width="90%" align="center" cellpadding=0 cellspacing=0 border=0>
<!-- BEGIN COMPONENT [control component category_vert_toggle] -->
[timed-build auto=1 if="[control timed 0]" minutes="[control timed 0]"]
[set found_cat][/set]
[loop
prefix=box
search="
fi=area
st=db
tf=sort
ac=0
ac=0
co=yes
sf=sel
op=eq
se=[control set_selector left]
sf=which_page
op=rm
se=[control page_class all|@@MV_PAGE@@]
"]
<tr>
<td valign="top" class="categorybar">[if !scratch toggleswitchon][tmp
toggleswitchon][control toggleswitchon][/tmp][/if][if !scratch
toggleswitchoff][tmp toggleswitchoff][control
toggleswitchoff][/tmp][/if][seti holder][value cats][/seti]
[if scratch holder eq "[box-data area code]"]<a
href="[process]?mv_action=refresh&cats=&mv_nextpage=index"><font
class="categorybar" size="+1">[if scratch toggleswitchoff]<img border=0
src="[control toggleswitchoff]">[else]-[/else][/if]</a></font>
[else]<a href="[process]?mv_action=refresh&cats=[box-data area
code]&mv_nextpage=index"><font class="categorybar" size="+1">[if scratch
toggleswitchon]<img border=0 src="[control
toggleswitchon]">[else]+[/else][/if]</a></font>[/else][/if]
<b> [box-exec bar_link]area[/box-exec]</b></td>
</tr>
<tr>
<td valign="top" class="categorybar">[set found_cat]1[/set]
[loop prefix=cat
search="
fi=cat
st=db
tf=sort
tf=name
rf=code,name
sf=sel
se=[box-code]
"
]
[tmp holder][value cats][/tmp]
[if scratch holder eq "[box-data area
code]"] [cat-exec
bar_link]cat[/cat-exec]<br>[/if][/loop]</td>
[tmp def][scratchd holder][/tmp]
</tr>
[/loop]
[if !scratch found_cat]
<tr>
<td class="categorybar">
[loop
search="
ra=yes
tf=description
"
]
[page [loop-code]][loop-field description][/page]<BR>
[/loop]
</td>
</tr>
[/if]
[/timed-build]
</table>
<br>
</td></tr>
<!-- END COMPONENT [control component category_vert_toggle] -->
Sorry for the long post, I know for the most part its the same vertical
category list, but with the new toggle switch. woohoo, I'm just trying to
make it a little more fullproof, I dunno if there is a big difference
between using seti, and tmp.. hmm
Feedback Please!
-----------------------------------------
Brendan Crosser-McGay
brendan@paymentonline.com
-----------------------------------------