8 YEARS AGO

Tips and Tricks: Macros in Widgets

Here is a quick tip that is useful if you work a lot with widgets in Kentico. You might know that macros are not allowed in the widgets editing form because of security reasons. Luckily for us developers there is a nice little workaround to enable macro resolving in widgets: Add the macro parameter as default value for the field and make sure to uncheck "Display attribute in the editing form". In the screenshot below you can see an example of this where the title querystring is used in the news lists where condition.

Here is a quick tip that is useful if you work a lot with widgets in Kentico.

You might know that macros are not allowed in the widgets editing form because of security reasons. Luckily for us developers there is a nice little workaround to enable macro resolving in widgets:
 
Add the macro parameter as default value for the field and make sure to uncheck "Display attribute in the editing form".

In the screenshot below you can see an example of this where the title querystring is used in the news lists where condition.

macros_in_widgets.png