How to override /helixultimate/layouts/frontend/modules.php ? - Forum | JoomShaper
Staff replied Helix Framework

How to override /helixultimate/layouts/frontend/modules.php ?

Asked by MF 3 years ago Last activity 3 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!

15 replies

Ofi Khan Staff

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

Toufiq Senior Staff

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

MF Asked this
3 years ago · edited

@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

Toufiq Senior Staff

Does solved your issue?

MF Asked this

@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.

MF Asked this

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??

MF Asked this

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

Pavel
3 years ago · edited

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.

Toufiq Senior Staff

@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

Log in to reply.