Rank: Member
Joined: 12/23/2003(UTC) Posts: 909
|
When I click on a product that is assigned to a category, I lose the <li class="current"> for that category link in the navigation menu.
Am I the only one losing this class? |
|
|
|
|
Rank: Member
Joined: 7/15/2004(UTC) Posts: 368
|
I've haven't seen it with any SP release and was hoping that it would be in a SP at some point. I made the suggestion awhile ago. The collapsing menu without the Current class is difficult to style ootb. |
|
|
|
|
Rank: Member
Joined: 5/24/2004(UTC) Posts: 4,147
|
I lose it as well. I'm sure it feels a bit disorienting for users.
We really need an effective rebuild of the category navigation module in SP3, at least. |
|
|
|
|
Rank: Member
Joined: 12/23/2003(UTC) Posts: 909
|
A hot fix would be pretty sweet. or at least some pointers provided. |
|
|
|
|
Rank: Member
Joined: 3/8/2007(UTC) Posts: 139
|
Hey Matt, Could you expand on this a little? Are you specifically referring to the breadcrumb menu, or one of the menu content blocks? When you are on the product page, the product page is your "current" page. Do you want the last breadcrumb menu link to also have the "current" class?
Thanks, |
Everett Comstock
BV Software |
|
|
|
Rank: Member
Joined: 4/10/2006(UTC) Posts: 462
|
I believe that is what he is after as that is what I would like :-). It makes sense that from a category standpoint, whatever category the product is in would be the "current" category you are looking at.
We would also like to see the category menu block expand out and select the current category for a product when navigating directing to a product page. The logic for which category to select could simply be the same used to display the breadcrumbs or the "top" breadcrumb if like us you have product pages display all breadcrumbs. |
Netriplex Corporation<br /> |
|
|
|
Rank: Member
Joined: 5/24/2004(UTC) Posts: 4,147
|
Everett, not talking about the breadcrumbs. It's the Category Menu Content Block; the existing options aren't very usable and the whole module really needs to be re-imagined from a UI perspective.
Martell's point is that the top-level category should also have a 'current' or 'parent' class when a sub-category is selected, or when visiting a product assigned to that category. |
|
|
|
|
Rank: Member
Joined: 12/23/2003(UTC) Posts: 909
|
Hey Everett, sometimes a visual is the best descript ion! As a navigational helper I bold the current category link in the left navigation. When it hits the product page, losing that class eliminates my ability to do this. Matt@9BallDesign attached the following image(s): screenshot.jpg (61kb) downloaded 139 time(s).You cannot view/download attachments. Try to login or register. |
|
|
|
|
Rank: Member
Joined: 3/8/2007(UTC) Posts: 139
|
Hey Matt,
That explains it perfectly. I'll see what I can do.
Thanks, |
Everett Comstock
BV Software |
|
|
|
Rank: Member
Joined: 12/23/2003(UTC) Posts: 909
|
|
|
|
|
|
Rank: Member
Joined: 3/8/2007(UTC) Posts: 139
|
Hey Matt,
This may work for a temporary fix. It really does not properly address the issue, so use it sparingly. It will keep the "current" class on the category link, but it will also affect any subcategories that may reside beneath the category you are in. Edit your "SiteRoot\BVModules\ContentBlocks\Category Menu\view.ascx.vb" file and make the following change:
Private Sub AddSingleLink(ByVal c As Catalog.Category) If c.Bvin = currentId Then If TypeOf Me.Page Is BaseStoreCategoryPage Then Me.MenuControl.Controls.Add(New LiteralControl("<li class=""current"">")) Else Me.MenuControl.Controls.Add(New LiteralControl("<li>")) --------------------------------------> Change this to <li class=""current""> End If Else Me.MenuControl.Controls.Add(New LiteralControl("<li>")) End If
I would like to hear any and all suggestions that you guys may have in regard to this control. I'll add them to the system and see if we can make some changes in time for SP3.
Thanks, |
Everett Comstock
BV Software |
|
|
|
Rank: Member
Joined: 3/8/2007(UTC) Posts: 139
|
Hey Matt,
In addition to the code above, I would add a class such as class="belowcurrent" to all of the <ul> tags located in the
Private Sub LoadPeersAndChildren()
sub routine of the VB file. If you then add the style to your CSS file, you can get a much better looking menu tree that accentuates only the category level that you desire.
Thanks, |
Everett Comstock
BV Software |
|
|
|
Rank: Member
Joined: 4/10/2006(UTC) Posts: 462
|
Hi Matt, I have attached some code that is not 100% fully tested so you would be somewhat of a beta tester, but my initial test appear to indicate that everything works as it should. To use replace your current view.ascx.vb file in the Category Menu directory (make a backup of the original first). Basically it will add "currentparent" as a class to any category in the tree that is parent category of the current category. It will add a "current" as a class to the current category. It also adds an algorithm that finds the "best" category to show as the current category if someone navigates directly to a product page. My "best" is considered to be the first, deepest category found in the list of categories a product belongs too. Unlike the standard menu from bv, this menu will also cause the category menu to expand down to the "best" category chosen by the logic. Please report any issues you see... File Attachment(s): view.ascx.vb (13kb) downloaded 253 time(s).You cannot view/download attachments. Try to login or register. |
Netriplex Corporation<br /> |
|
|
|
Rank: Member
Joined: 5/24/2004(UTC) Posts: 4,147
|
You wouldn't need to add a 'belowcurrent' class to a UL. Just use 'li.current ul' in your stylesheet. |
|
|
|
|
Rank: Member
Joined: 3/8/2007(UTC) Posts: 139
|
|
Everett Comstock
BV Software |
|
|
|
Rank: Member
Joined: 12/23/2003(UTC) Posts: 909
|
Hey Everett, your fix did the trick.
Hey Caplink, I'm going to implement your code once I get into the product build. Right now, products are not assigned to multiple categories so I won't be able to do a full test. about 200 products in, is where the multiple assignments start so that'll be the tester.
Thanks! |
|
|
|
|
Rank: Member
Joined: 12/30/2006(UTC) Posts: 65
|
Hey Matt,
Just curious, did you implement the code Caplink hooked up for everyone? If so, how did it pan out for you with your products assigned?
-Dave
|
|
|
|
Rank: Member
Joined: 12/23/2003(UTC) Posts: 909
|
hey dave, you know how it is.... you set out to do something at 8 am. and it's friday by the time you look up at the clock...LOL...
This is still on my large list of to do's so I'll get to it when I get back to punchlist time. |
|
|
|
|
Rank: Member
Joined: 12/30/2006(UTC) Posts: 65
|
Hi Matt,
I hear ya :> I implemented the code in my (never-ending) site build, and it works great. I had to set a lot of styles to handle multiple scenarios, such as first level category when it's current, then again when it's current parent.. and 2nd level categories had a few multiple scenarios to account for.
Here's the css I used. I have the top levels using a right facing, and down facing arrow background image. Gives it a cool open/closed category marker. Hopefully this css will be helpful for others, it covers up to the 2nd level of categories.
I commented the behaviors that each of the styles control:
/* Category Sidebar Menu */ .categorymenu ul {padding:0; margin:5px 0;}
/*First Level Category menu */ .categorymenu ul li {padding: 0px; list-style:none;} /*First Level Category */ .categorymenu ul li a { text-decoration:none; Display:block; width: auto; Background-Color: #1f5f17; background-repeat: no-repeat; background-image: url(/Objects/CategoryNav_Arrow-Closed.gif); background-position: 6px 50%; color: #FFFFFF; Padding: 3px 5px 3px 20px; border-bottom: 2px Solid #ffffff; } /*First Level Category Link*/ .categorymenu ul li a:hover {} .categorymenu ul li.current a, .categorymenu ul li.currentparent a { text-decoration:none; Display:block; width: auto; Background-Color: #1f5f17; background-repeat: no-repeat; background-image: url(/Objects/CategoryNav_Arrow-Open.gif); background-position: 6px 50%; color: #FFFFFF; Padding-Left: 20px; border: none; } /*First Level Category Link - Current*/
/*Second Level Category menu */ .categorymenu ul li ul li {} /*Second Level Category */ .categorymenu ul li.current ul li a, .categorymenu ul li.currentparent ul li a { Background-Color: #FFFFFF; background-image:none; border: none; padding: 0px; color: #1a4415; } /*Second Level Category Link, when First has current selected - meaning no secondary is selected*/ .categorymenu ul li ul li a { Background-Color: #FFFFFF; background-image:none; padding: 0px; color: #1a4415; border: none; } /*Second Level Category Link*/ .categorymenu ul li ul li.current a { Background-Color: #FFFFFF; border: none; background-repeat: no-repeat; background-image: url(/Objects/CategoryNav_Bullet.gif); background-position: 0px 50%; Padding-Left: 10px; font-weight: bold; color: #1a4415; } /*Second Level Category Link*/
|
|
|
|
Rank: Administration
Joined: 4/2/2004(UTC) Posts: 2,394 Location: Hummelstown, PA Thanks: 6 times Was thanked: 163 time(s) in 158 post(s)
|
I've never been a fan of the markup or functionality of the BV menus in 2004 or 5. We've written our own version of the menu control for both versions, and the markup it generates is the same markup we use on all of our sites. It definitely simplifies things for our designers. We don't have any BV 5 sites in production yet running this, but here's a link to near-production site that uses the control. This is implemented as a server control rather than a BV module, so it's not quite as user friendly. In other words, you can't add it to pages via the admin, but rather you put it directly into the markup like you would any other server contrl (e.g. <asp:Label>). http://dev.develisys.com/RoomMates2/Aaron |
Aaron Sherrick BV Commerce Toll-free 888-665-8637 - Int'l +1 717-220-0012 |
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.