HomeHome Product Discus... Product Discus...SmithCartSmithCartPassing CategoryID in querystring for creating a custom category menu.Passing CategoryID in querystring for creating a custom category menu.
Previous
 
Next
New Post
5/12/2012 8:19 AM
 

Hello again good sirs,

I am building a webstore that has 36 different BuyNow modules on 36 unique pages, in order to account for the wide range of product my company has for sale. Due to the complexity, I can not simply use the category module for my store navigation, as I will need to create many custom links in those categories.

I have found that Passing the CategoryID in the querystring is a great solution to this problem, and I have successfully built my own custom shopping navigation!

However, I have run into one problem setting up this navigation to be user friendly. In order to illustrate my problem, lets say for example I have two unique buynow modules set up. They would be on pages

www.test.com/guitars

www.test.com/drums

Each buynow module has two categories. Soo all categories between stores would be Guitars1(categoryid=1), Guitars2(categoryid=2); Drums1(categoryid=3), Drums2(categoryid=4);

Both buynow pages have the exact same navigation on the left hand side, which I have provided via an HTML module, so it is easy to switch between the stores and categories. The menu structure is as follows.

link 1 = www.test.com/guitars.aspx

link 2 = www.test.com/guitars.aspx?categoryid=1

link 3 = www.test.com/guitars.aspx?categoryid=2

link 4 = www.test.com/drums.aspx

link 5 = www.test.com/drums.aspx?categoryid=3

link 6 = www.test.com/drums.aspx?categoryid=4

 

Now for the problem. I wish for my navigation to show which link is currently selected. This is easy to do for links 1 and 4, as they are unique pages on my site. I can simply change their css class on the page. However,  I need links 2,3,5,6  to do the same. 

I noticed that the category module has this issue solved by making the link chosen a "selected node", so even though the user remain on the same buynow page, switching categories within that buynow page is shown in their shopping menu with a highlighted link.

Is there a relatively simple way for me to implement a similar feature with my custom menu? I simply can not use the category module for my navigation :(

 

Hope this made sense. Thanks!

Alex

 
New Post
5/12/2012 8:44 AM
 

I have fiddled around with the possibility of using javascript's "onclick" to change the class of the link selected. However, I believe that this possibility will only work if passing a category id into the querystring DOES NOT refresh the entire page, just the module products displayed.

Is this the case?

 
Previous
 
Next
HomeHome Product Discus... Product Discus...SmithCartSmithCartPassing CategoryID in querystring for creating a custom category menu.Passing CategoryID in querystring for creating a custom category menu.