I need to override a variable inside a popover.js - It's an addon of pagebuilder - Forum | JoomShaper
Solved SP Page Builder

I need to override a variable inside a popover.js - It's an addon of pagebuilder

Asked by Miguel 2 years ago Last activity 2 years ago

Hi there! how are you?
just a little question. I need to modify the variable DELAY_TIME inside a popover.js (it's an addon of pagebuilder)

So, I'm trying to make an override of the script, but I'm not sure about the right path.

Is there a way to override only the variable instead of the entire script?

If not, I need to know who to override the enterely script.
Thank you for your help!

Accepted answer

Marked as the solution
Paul Frankowski Senior Staff

2nd option would be to change file permission from 644 to 444 - that should protect that file from override during update.

...but backup (just in case is always recommended)

4 more replies

Toufiq Senior Staff

Hi there,

Thank you for reaching out. Here is the file location of Popover JS. If you override the code you need to keep a backup before update of the Page Builder every release.

components/com_sppagebuilder/assets/js/addons/popover.js

Best regards,

Toufiqur Rahman (Team Lead, Support)

Miguel Asked this

Thanks Toufiq and Paul.
Perhaps I didn't explained well .

I've already harcoded the popover.js script in the original location.
What I'm trying to do is create an override of the script following this method
https://docs.joomla.org/J4.x:Template_Overrides
https://docs.joomla.org/Understanding_Output_Overrides

Is it possible to do with this script?

Thanks for your help.

Toufiq Senior Staff

Please check this path. You need to create some directory and file.

templates/your_template/sppagebuilder(new directory)/addons(new directory)/popover(new directory)/site.php and admin.php (new file)
Paul Frankowski Senior Staff

No. Becuase this is NOT a component page view, or module view or single addon.

Miguel Asked this

Ok, thank you Toufiq and Paul. I'll try your methods. Thanks a lot

Toufiq Senior Staff

You are most welcome & Thanks

Log in to reply.