an ASP.NET Open Source CMS & eCommerce platform
Search:
Skip Navigation LinksHome > DotShoppingCart Forums > Support > Using DotShoppingCart > Using Category Expand Depth
Last Post 3/4/2008 12:29:11 PM By Linden. 8 replies.
3/3/2008 7:14:32 PM
Linden
Posts: 32
Joined: 3/19/2008
Using Category Expand Depth

I have set up several categories each with several subcategories. I set the Expand Depth to 0 in hopes that only my top level categories would show in the category list. Instead all categories and subcategories are always showing. This is version 2 beta so it may just not be working yet. More likely, I just don't understand how it's supposed to work. Is it possible to only show top-level categories until you click on one?

Linden

3/3/2008 7:37:01 PM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Using Category Expand Depth

I believe 0 means expand all. Try setting it to 1.

DotShoppingCart Staff
3/4/2008 7:11:11 AM
Linden
Posts: 32
Joined: 3/19/2008
Re: Using Category Expand Depth

I'm sorry. I should have mentioned in my original post that I tried 0, 1, and the default 2, all with no apparent change. All categories and subcategories are always visible in the category list.

Linden

3/4/2008 8:44:41 AM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Using Category Expand Depth

I just looked at the code which doesn't use that data at all. Here is the quick fix.

In Web/Store/Blocks/CategoryList.ascx.cs line 73:

change

categories = <font color="#2b91af" size="2"><font color="#2b91af" size="2">Category.GetCategories(0, <font style="background-color: #ffff00">2);

to

categories = <font color="#2b91af" size="2">Category.GetCategories(0, <font style="background-color: #ffff00">1);

DotShoppingCart Staff
3/4/2008 10:01:24 AM
Linden
Posts: 32
Joined: 3/19/2008
Re: Using Category Expand Depth

Yes, that does seem to limit the list to only the top level categories. It also makes sub-categories inaccessible. It would be nice if the final version will allow you to click on, or float over, a top level category to show its subcategories.

Linden

3/4/2008 11:04:01 AM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Using Category Expand Depth

The sub-categories should be accessible when you click the top level categories. Let me know if this is not the case.

DotShoppingCart Staff
3/4/2008 11:33:23 AM
Linden
Posts: 32
Joined: 3/19/2008
Re: Using Category Expand Depth

Nope. It's not the case, at least not for me. The only way I can see the subcategories is by clicking on the Categories link in the site navigation bread crumb.

Linden

3/4/2008 12:10:15 PM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Using Category Expand Depth

Here is from my test.

Top level

<img alt="" src="http://www.dotshoppingcart.com/dbfile.axd?name=toplevel.JPG" />

After click the first link on the top.

<img alt="" src="http://www.dotshoppingcart.com/dbfile.axd?name=afterclick.JPG" />

If you want to display second level on mouse hover over, you could just create css and javascript to archive this.

DotShoppingCart Staff
3/4/2008 12:29:11 PM
Linden
Posts: 32
Joined: 3/19/2008
Re: Using Category Expand Depth

Hmm. Must just be me. Thanks for the reply. If it works for everyone else I'll have to figure out what's wrong with my setup.

Linden