Your Cart is currently empty!
Product update
Coupon
add
Coupon code invalid! Please re-enter!
AJAX loader
You are here: HomeForum
Welcome, Guest
Report bugs, Userguide, New Ideas..
  • Page:
  • 1
  • 2

TOPIC: Customize the level2

Customize the level2 13 years, 3 months ago #806

  • scopel.andrea
  • OFFLINE
  • Single Product
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
Hi, I need to know if is possible give an id to each item in order to customize the css for each item.

For example: Portfolio
Portfolio 1 (it will be <li class="level2_item1 ">)
Portfolio 2 (it will be <li class="level2_item2 ">)
etc...

Now it shows this: Portfolio
Portfolio 1 (it will be <li class="level2 first ">)
Portfolio 2 (it will be <li class="level2 last ">)


Otherwise, I would like to know how to remove the space between level2 and first / last, so I could customize my css like this:. Level2first and level2last

Many many thanks!

Re: Customize the level2 13 years, 3 months ago #807

  • admin
Dear scopel.andrea

Please open modules\mod_ytmegamenu\menusys\class\mega\tmpl\default.php file, at about line 33, find this code:

$child->getContent();


and change to:

$child->addClass('level'.$child->get('level',1) . '_item'. $idx);			
$child->getContent();


Hope it helps

Re: Customize the level2 13 years, 3 months ago #808

  • scopel.andrea
  • OFFLINE
  • Single Product
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
Thanks Admin for your fast reply!
I tried your code, but now it's become <li class="level2 first level_item1">
it's perfect, but i want to delete level2 first, so it will be <li class="level_item1">
Thanks!

Re: Customize the level2 13 years, 3 months ago #815

  • admin
Dear scopel.andrea

I think that level2 first is not effect to your idea. We have to keep this because more codes are using this

Re: Customize the level2 13 years, 3 months ago #820

  • scopel.andrea
  • OFFLINE
  • Single Product
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
Can you at least remove the space between level2 and first / last in order to become <li class="level2first">, and not, <li class="level2 first">?
So i can use in css the class .level2fist and level2last!
I hope I have explained my goal!
Many thanks for help me.

Re: Customize the level2 13 years, 3 months ago #821

  • admin
.first and .last are using in our code to change the menu

You can use level2_item1, .. in this case
  • Page:
  • 1
  • 2
Time to create page: 0.24 seconds

Notification

Please find your issue via Suggested Posts before submitting your question. We have solved the most of issues and maybe your issue was solved before.

Latest My Topics

No posts to display.

Love all our templates?

Join our membership clubs starting at $49 only for access to all of our templates

Join Now
Home Pricing
Your Cart is currently empty!
Product update
Coupon
add
Coupon code invalid! Please re-enter!
AJAX loader
SearchSupport
Magento Themes Magento Extensions Free Magento Extensions Prestashop Themes Prestashop Modules Magento 2 Themes