How To Override /helixultimate/layouts/frontend/modules.php ? - Question | JoomShaper
Black Friday sale is live with flat 50% OFF. Sale ends soon! Grab your deal now!

How To Override /helixultimate/layouts/frontend/modules.php ?

M

MF

Helix Framework 2 years ago

Hi there!

I need to add word "MENU" next to burger icon. So I found this part of page is being generated in /plugins/system/helixultimate/layouts/frontend/modules.php

I'd love to use css ::before or ::after to add this text, but I have multilingual site, so this approach won't work, as long as helix framework ignores whatever css classes I'm trying to apply to menu module, it's transfered inside menu, but not applied to actual place where burger icon is (in header, I mean).

As result, I HAVE to add something like $output .= Text::_( 'MENU' ) . '</a>'; to modules.php file.

So, question is where is safe place for my override version of modules.php, so that it won't be overriden by default file on next update?

Thanks in advance!

0
15 Answers
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 2 years ago #97350

Hello MF

You can customize the file but there is no way to preserve this. You have to change after each template or plugin update.

Best regards

0
Toufiq
Toufiq
Accepted Answer
Senior Staff 2 years ago #97353

Hi there,

Thanks for contacting us. Sorry for the inconvenience. Please follow the instructions.

Go to the file location

templates/shaper_helixultimate/features/logo.php

https://prnt.sc/KLl5jzXbo9rK

-Thanks

0
M
MF
Accepted Answer
2 years ago #97418

@Toufiq

nope. editing templates/shaper_helixultimate/features/logo.php doesn't alter burger-menu toggler.

only plugins/system/helixultimate/layouts/frontend/modules.php

screenshot:

https://prnt.sc/0e_5lpQ_US6z

0
Toufiq
Toufiq
Accepted Answer
Senior Staff 2 years ago #97420

Does solved your issue?

0
M
MF
Accepted Answer
2 years ago #97426

@Toufiq

nope. As mentioned your staff member (Ofi Khan) an hour before your answer, this is not update-proof solution. My code works, but will be wiped away on next update of plugin. I need the way to override this particular file OR make hamburger menu generation plugin-independant. Both ways should theoretically make it safe in case of future updates.

0
M
MF
Accepted Answer
2 years ago #97437

Guys, seriously?

"left" position for offcanvas in header is rendered via templates/shaper_helixultimate/features/logo.php and "right" position for offcanvas is rendered via plugins/system/helixultimate/layouts/frontend/modules.php ??????? Are you coding or kidding??

0
M
MF
Accepted Answer
2 years ago #97440

by the way, year-old bug is still there. If I choose ONLY Offcanvas menu to be present (not "Mega menu & Offcanvas"), I'm getting TWO hamburger togglers.

The quality of your product is falling down day by day. Start fixing it already. I'm paying customer, so I expect you to do your job.

THIS: https://www.joomshaper.com/forum/question/8202

settings in Helix: https://prnt.sc/rtyjg2mMxi_P

two togglers: https://prnt.sc/tkaHCcCJtWRB

0
M
MF
Accepted Answer
2 years ago #97441

And your system of inserting pictures here on forum is bloody broken too.

0
Pavel
Pavel
Accepted Answer
2 years ago #97461

Hi @MF.

You can create your custom header based on one of existing and make all that you want by editing header.php. Update will not affect your changes. I don’t understand why the guys from support did not mention this obvious way. Hamburger is not generated by helix plugin. It has an existing real code.

..."left" position for offcanvas in header is rendered via...

I agree with you, a very strange solution :). Even in the aspect of the layout. That is why I use CSS instead of switching to "left" position.

0
Toufiq
Toufiq
Accepted Answer
Senior Staff 2 years ago #97555

@MF

nope. As mentioned your staff member (Ofi Khan) an hour before your answer, this is not update-proof solution. My code works, but will be wiped away on next update of plugin. I need the way to override this particular file OR make hamburger menu generation plugin-independant. Both ways should theoretically make it safe in case of future updates.

yes you have to make a backup before udpate next version.

-Thanks

0
M
MF
Accepted Answer
2 years ago #97572

@Toufiq

So, as I told you, these two bugs are related.

See what happens when I set menu to appear ONLY in "Offcanvas":

templates/shaper_helixultimate/features/menu.php AND plugins/system/helixultimate/layouts/frontend/modules.php :

(same hamburger toggler in same position is rendered both by template AND by plugin - and it's impossible to shut plugin render off and keep only template's one)

0
M
MF
Accepted Answer
2 years ago #97596

@Pavel thanks for good clue!

final solution is:

  1. to keep plugin file in default state

  2. add necessary text to templates/shaper_helixultimate/features/menu.php, like:

    $output .= '<a id="offcanvas-toggler" aria-label="' . Text::_('HELIX_ULTIMATE_NAVIGATION') . 
    '" title="'. Text::_('HELIX_ULTIMATE_NAVIGATION') . 
    '"  class="offcanvas-toggler-right d-flex align-items-center" href="#">
    <div class="burger-icon" ><span></span><span></span><span></span>
    </div>&nbsp;'. Text::_( 'MENU' ) . '</a>';
  3. dumb but effective hiding exessive toggler (rendered by plugin) via css, below:

    #offcanvas-toggler.offcanvas-toggler-secondary.offcanvas-toggler-right {
     display: none !important;
    }
0
Toufiq
Toufiq
Accepted Answer
Senior Staff 2 years ago #97609

@MF That you want to do exactly this function is not available that's why you need modify the code. But, Customization core is not allowed our support policy. If you need this then you need to keep a backup after modify the code. Thank you & Thanks @Pavel

0
M
MF
Accepted Answer
2 years ago #97618

@Toufiq guys your support is useless. I don't need information on your policies, or what you CAN'T do. When I turn to support I expect my problem to be solved. I'm paying customer and my license is definitely includes ONE YEAR OF SUPPORT

I'm not asking you to customize template, I'm showing you have bugs in your code and this code is dirty as mud, rendering same position is split and mixed in two different places - just go fix your shit, make product worth money that you ask for it.

0
Toufiq
Toufiq
Accepted Answer
Senior Staff 2 years ago #97784

I have informed our developer team. I hope the next release will fix the double off-canvas menu toggler issue. Thanks

0