I'm using a similar template to generate CSS from LESS styles as in the Site Theme (variables.less => variables.vm), to define styles for the widget based on some environment conditions and configuration settings.
I found that "-evo-widgetfile-url" does not work as expected in Verint 12.0.3.17950. But this function working well in Verint 11.1.x versions.
Sample code to reproduce this issue:
Widget Content component code:
$core_v2_page.AddLink('stylesheet', $core_v2_widget.GetExecutedFileUrl('render-styles.less'), "%{ Position = 'AfterTheme' }")
<div class="unique-wrapper">
</div>
Widget "render-styles.less" code:
@import "-evo-widgetfile-url('variables.vm')";
Widget "variables.vm" code:
#if ($core_v2_user.Accessing.Username == $core_v2_user.AnonymousUserName)
.unique-wrapper {
height: 100px;
background: blue;
}
#else
.unique-wrapper {
height: 100px;
background: green;
}
#end
On the page where this widget placed I see the following output in the network tab for my widget style file:
@import "-evo-widgetfile-url('variables.vm')";