Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Alright, so I'm attempting to just add a CSS class to a selected category link.

I'm trying to get more familiar with the category tree (category_tree.php) and the only thing I've found that controls the selected output is the following:

$OSCOM_CategoryTree->setCategoryPath($cPath, '<strong>', '</strong>');

This, of course, just bolds the current selected category.

However, I'm just looking to do something similar to this (see the "CUSTOM_CSS_CLASS"):

<a class="list-group-item list-group-item-action CUSTOM_CSS_CLASS" href="http://mywebsite.com/catalog/index.php?cPath=3"><strong>Electronics</strong></a>

Is there a way to achieve this with any of the available functions within category tree?

Link to comment
Share on other sites

Thanks @JcMagpie

I was finally able to look at your post and I'm not sure if that's exactly what I'm looking to do. 

I pretty much want to add a class to the current selected category and I thought it could be done utilizing one of the functions from the category_tree.php

I'm going to play around with some things and see what I can come up with, thanks again!

Link to comment
Share on other sites

If you just want to style the text between strong tags then you should be able to replace them with

<span class="custom_class"></span>

then add to css

.custom_class { color:red }

or use bootstrap classes

<span class="text-danger"></span>

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...