Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear colleagues
Is it possible to modify the extension settings without using the extension object properties panel?, and then persist the new values (do not disappearing when clicking on F5)?
I just need a basic example about how to:
- show a button on the front end (not extension properties panel)
- click on a button and then modify one extension setting (just will make sense if you are on Edit mode)
This seems easy but I can't find any example.
I tryed a basic
layout.myProperty = true; in my js code
This just modify the properties temporarily but the new value does not persist.
Thanks for your help!
Hi
Nice plugin, very useful, it worked for me, the right path/code was:
this.backendApi.applyPatches([
{
"qPath": "/buttons/dimfields",
"qOp": "replace",
"qValue": "2"
}
], false);
It changes the value of the setting, but unfortunately it loops, and repeats the process continuously.
Any experiences with this issue?
Regards
Are you doing this in the paint method? Perhaps you should check that the property does not already have the correct value? Or perhaps you should do it when the user clicks on a button, meny etc.
Hi Erik
Thanks, I believe I'm in the right path. But there are no good examples.
Could you help, I'm trying to modify the property 'dimfields' of an extension:
layout.backendApi.applyPatches([
{
"qPath": "/dimfields",
"qOp": "replace",
"qValue": "2"
}
], false);
When I type the this code, nothing happens.
Is it just a question about the qPath ? if the answer is yes, how can I find the right path ?
Thanks again!
Hi,
You can check the properties in the developer meny. Or you could use the Chrome extension I have developed:
https://chrome.google.com/webstore/detail/add-sense/bbiljflfafkaejgdebbnmcohpidgkejj
Hi
Nice plugin, very useful, it worked for me, the right path/code was:
this.backendApi.applyPatches([
{
"qPath": "/buttons/dimfields",
"qOp": "replace",
"qValue": "2"
}
], false);
It changes the value of the setting, but unfortunately it loops, and repeats the process continuously.
Any experiences with this issue?
Regards
Are you doing this in the paint method? Perhaps you should check that the property does not already have the correct value? Or perhaps you should do it when the user clicks on a button, meny etc.
My blame, after applying the patches in the right event it works.
In the paint method, using an event when clicking a button.
Thanks a lot Erik!!