HomeHome Product Discus... Product Discus...SmithCartSmithCartCategory DIsplayCategory DIsplay
Previous
 
Next
New Post
8/24/2010 7:57 AM
 

When selecting a category, is there a way to show in the items listing WHICH category you are currently in?

Additionally, when you expand a category, is there a way to KEEP it expanded for easier navigation?

 
New Post
8/24/2010 7:37 PM
 

In categorymenu.ascx you could style the treeview control to highlight the selected category link a different color or style using css. Maintaining the state of the category menu when you navigate away to a different page and return is something we need to program in code behind of the module.

Dave


At your service,
Dave Smith
DotNetNuke Consulting, DotNetNuke Store and DNN Ecommerce
 
New Post
8/24/2010 8:43 PM
 

Here is an example of styling the treeview category menu in the cart. Open up categorymenu.ascx and add the cssclass tags as follows:

<asp:TreeView runat="server">
<NodeStyle CssClass="NodeStyle" />
<HoverNodeStyle CssClass="HoverNodeStyle"/>
<SelectedNodeStyle CssClass="SelectedNodeStyle"/>
</asp:TreeView>



Then open up CategoryMenu.css file add the following styles:

.NodeStyle
{
width: 140px;
font-size: 10px;
display: block;
text-decoration: none;
color: #ffffff;
border: solid 1px Transparent;
padding: 2px 2px 2px 2px;
}

.NodeStyle:hover,
a.NodeStyle:hover,
.NodeStyle:link:hover,
a.NodeStyle:link:hover
{
font-size: 10px;
display: block;
text-decoration: none;
color: #003687;
border: solid 1px #71a9ff;
background-color: #c6ddff;
padding: 2px 2px 2px 2px;
}

.HoverNodeStyle
{
font-size: 10px;
display: block;
text-decoration: none;
color: #ffffff;
border: solid 1px Transparent;
padding: 2px 2px 2px 2px;
}

.HoverNodeStyle:hover,
a.HoverNodeStyle:hover,
.HoverNodeStyle:link:hover,
a.HoverNodeStyle:link:hover
{
font-size: 10px;
display: block;
text-decoration: none;
color: #003687;
border: solid 1px #71a9ff;
background-color: #c6ddff;
padding: 2px 2px 2px 2px;
}

.SelectedNodeStyle
{
font-size: 10px;
display: block;
text-decoration: none;
color: #ffffff;
border: solid 1px Transparent;
padding: 2px 2px 2px 2px;
}

.SelectedNodeStyle:hover,
a.SelectedNodeStyle:hover,
.SelectedNodeStyle:link:hover,
a.SelectedNodeStyle:link:hover
{
font-size: 10px;
display: block;
text-decoration: none;
color: #003687;
border: solid 1px #71a9ff;
background-color: #c6ddff;
padding: 2px 2px 2px 2px;
}


At your service,
Dave Smith
DotNetNuke Consulting, DotNetNuke Store and DNN Ecommerce
 
New Post
8/25/2010 6:11 AM
 

Hmmm... I inserted the code and stylesheet, but I'm not seeing the change. But I'll play with it.

As far as navigating away and back again, that's not what I'm doing... I have the category in the left pane, and the cart in the right pane. It evidently does a post-back and refreshes the page when I click on something, which then collapses the node in the category, and doesn't let you know where you are. I was thinking a simple work-around would be to have the category shown in the cart itself, since that is what's being passed.... but having the treeview highlight or be styled in some way would also be acceptable; just something to let people know "Oh, that's where I am"... of course, the treeview collapses any sub-categories as soon as you click on them and it refreshes the screen.

It's not a deal-breaker by any means, it would just be a nice way to navigate if it told or showed you what category you were currently in.

 
New Post
8/25/2010 6:34 AM
 

I'll have to dig a little further. It doesn't look like it's using CategoryMenu.css at all... all of the styles are being picked up by skin.css

 
New Post
8/25/2010 8:40 AM
 

In the category setup if you remove the keyword field the category module will do an inter module communication instead of a postback.

-Scott


Scott Kelly
Project Manager
DotNetNuke Consulting, DotNetNuke Store and DNN Ecommerce
 
New Post
8/25/2010 11:02 AM
 

Try renaming CategoryMenu.css to module.css to see if it picks up the stylesheet.

-Scott


Scott Kelly
Project Manager
DotNetNuke Consulting, DotNetNuke Store and DNN Ecommerce
 
New Post
8/25/2010 11:17 AM
 

Do you mean to blank out all the CatSEOURL fields? Do they need to be null, or just an empty string?

 
New Post
8/25/2010 11:54 AM
 

yes blank or null is fine either one


Scott Kelly
Project Manager
DotNetNuke Consulting, DotNetNuke Store and DNN Ecommerce
 
New Post
8/25/2010 2:51 PM
 

I cleared them all out with a SQL Update statement... but still it seems to be doing a post-back.

As I have said before, I'd be glad to let you into my development site for a few minutes so you can a) see what it's doing and b) tell me what I'm doing wrong.

 
New Post
9/7/2010 12:12 PM
Accepted Answer 

OK... this works.

First, in CategoryMenu.ascx fix the stylesheet link as follows:

<link href="/DesktopModules/Smith.CategoryMenu/CategoryMenu.css" rel="stylesheet" type="text/css" />

... using an absolute path to the CSS file, instead of a relative one.

Next, the asp:TreeView I made look like this:

<asp:TreeView
ID="tvCatMenu"
ExpandDepth="0"
PopulateNodesFromClient="true"
ShowLines="false"
ShowExpandCollapse="true"
NodeStyle-CssClass="NodeStyle"
ExpandImageUrl="~/DesktopModules/Smith.CategoryMenu/tv_expander.gif"
CollapseImageUrl="~/DesktopModules/Smith.CategoryMenu/tv_collapser.gif"
OnTreeNodePopulate="tvCatMenu_TreeNodePopulate"
OnSelectedNodeChanged="tvCatMenu_SelectedNodeChanged"
runat="server"
CssClass="SmithProdtext" />

... notice the line that says NodeStyle-CssClass="NodeStyle"

Then the CSS stylings work properly.

 
Previous
 
Next
HomeHome Product Discus... Product Discus...SmithCartSmithCartCategory DIsplayCategory DIsplay