<%@ Register TagPrefix="Portal" TagName="Divider" Src="~/ModuleDivider.ascx"%>
<%@ Register TagPrefix="Portal" TagName="Title" Src="~/DesktopModuleTitle.ascx"%>
<%@ Control Language="c#" AutoEventWireup="false" Codebehind="ProductCategoryMenu.ascx.cs" Inherits="Xpdt.Commerce.ProductCategoryMenu" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
<%--

    This user control creates a menu of all product categories
    in the database.  This forms the left-hand navigation of the
    product catalog pages.

--%>
<TABLE width="100%">
	<TR>
		<TD class="ModuleFrame"><portal:title id="Title1" runat="server" EditText="Product Categories Settings" EditUrl="~/CommerceModules/Admin/Categories.aspx"></portal:title>
			<br>
			<asp:datalist id="MyList" runat="server" EnableViewState="false" Width="100%" cellspacing="0" cellpadding="0">
				<SelectedItemStyle CssClass="MenuSelected"></SelectedItemStyle>
				<SelectedItemTemplate>
					&nbsp;
					<asp:HyperLink id="HyperLink2" Text='<%# DataBinder.Eval(Container.DataItem, "CategoryName") %>' NavigateUrl='<%# "~/DesktopDefault.aspx?tabindex="+ TabIndex +"&tabid=" + TabID + "&CategoryID=" + DataBinder.Eval(Container.DataItem, "CategoryID") + "&selection=" + Container.ItemIndex %>' runat="server" />
				</SelectedItemTemplate>
				<ItemStyle CssClass="MenuUnselected"></ItemStyle>
				<ItemTemplate>
					&nbsp;
					<asp:HyperLink id="HyperLink1" Text='<%# DataBinder.Eval(Container.DataItem, "CategoryName") %>' NavigateUrl='<%# "~/DesktopDefault.aspx?tabindex="+ TabIndex +"&tabid=" + TabID + "&CategoryID=" + DataBinder.Eval(Container.DataItem, "CategoryID") + "&selection=" + Container.ItemIndex %>' runat="server" />
				</ItemTemplate>
			</asp:datalist>
			<br>
			<PORTAL:DIVIDER id="Divider1" runat="server"></PORTAL:DIVIDER>
		</TD>
	</TR>
</TABLE>
