View Single Post
  #2  
Old 12-15-2015, 02:54 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Easiest way to add a CSS class based on page data

Quote:
Code:
<li class="<widget class="XLite\Module\Client\ClientMegaMenu\View\CheckIfTopLevelCategoryForCurrentPage" thisCatId="8" /> ">

This code looks really weird. I believe there should be an easier way to do what you need.

What widget does render the mega menu? Why don't you add the check as a method to that widget class and use it as follows:
Code:
<li class="{doMyCheck(8)}">
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote