SuperPower09 Posted May 22, 2019 Share Posted May 22, 2019 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 More sharing options...
♥JcMagpie Posted May 22, 2019 Share Posted May 22, 2019 Link to comment Share on other sites More sharing options...
SuperPower09 Posted May 24, 2019 Author Share Posted May 24, 2019 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 More sharing options...
Hotclutch Posted May 24, 2019 Share Posted May 24, 2019 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.