Hello everybody,
I have a problem forming some xlm code within an action of this plugin. I changed the width of the entire side menu, but the animated sidemenu items did not follow the altered width by themselves. I got the problem solved by some static code and it works just fine. But I am eager to get it done with non static entries way down in the lines of code, and just the need to alter one variable in the top section of the sidemenu.xml.
My goal is to make the sliding menu entries just 20 pixels more narrow, than the entire menu width, since this is the needed space for the "onover" sliding effect.
Here is my static and primitive example:
<menu_settings background_width ="250"
...
/>
...
<action name="switch_menu">
...
set(plugin[%menu_0].width,230);
...
</action>
This way the sidemenu entries are 20 pixels more narrow. But I just want to change the background_width in the top entry and the action should subtract 20 pixels accordingly by itself. I tried various things, but never got it right. Any coding/syntax tips would be highly appreciated.
Here is my faulty code:
<action name="switch_menu">
...
set(plugin[%menu_0].width,sub(width,get(menu_settings.background_width);,20));
...
</action>
In plain math it should read: menu_0.width,230 = 250-20