Using macro expressions in menu items

  Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic! Mail us feedback on this topic!  

You can use macro expressions in menu item URL or JavaScript command (when you're editing the menu item in Kentico CMS Desk). These macros allow you to dynamically replace macro commands with specified values of the current menu item, such as alias path, id path, node name.

 

You only need to put {%ColumnName%} macros in the menu item URL or JavaScript attribute. The URL will look like this:

 

products.aspx?show=brand&aliaspath={%NodeAliasPath%}

 

The menu will redirect user e.g. to URL products.aspx?show=brand&aliaspath=/MobileStore/Products/Nokia.

 

Please note: All apostrophes (') in source data are escaped to \' so that they do not break JavaScript.

 

Page url: http://devnet.kentico.com/docs/controls/index.html?using_macro_expressions_in_menu_items.htm