
[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Foundation - auto prod_group and category fine tune.
I am trying to make sense of the /templates/components/category_vertical
file in the Foundation demo 4.8.2
I believe this file is responsible for auto-creating the default Foundation
category link list on the left side.
The problem I am having is with a category that has the same name as another
category in a different prod_group.
Similar thread in the archives i.e.
Cat - Food
Dog - Food
Clicking on Food brings up the same list of items in either case.
I know that this functionality can be easily added with a typical IC search
query using a coordinated search but the code in this component that
automatically pulls in the categories and groups from the products file and
creates the links is a little beyond me. How do I get the code below to
create category links that will only return items exclusive to a category
within a prod_group. Something to do with [cat-exec bar_link] ?
<!-- BEGIN COMPONENT [control component category_vertical] -->
[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">
<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]
"
]
[cat-exec bar_link]cat[/cat-exec]<BR>
[/loop]
</td>
</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>
_______________________________________________
interchange-users mailing list
interchange-users@interchange.redhat.com
http://interchange.redhat.com/mailman/listinfo/interchange-users