How to change control properties programmatically
This article shows how to change properties of CMSListMenu control.
How to set programatically control properties such as path/maxrelativelevel:
You will need to change
StopProcessing property of control to true:
<cms:CMSListMenu ID="ListMenu" runat="server" ClassNames="CMS.MenuItem" StopProcessing="true" />
And then you can use following code to set necessary properties in Page_Load event of code behind:
this.ListMenu.StopProcessing = false;
this.ListMenu.Path = "/Partners%";
this.ListMenu.ReloadData(true);
See also: Applies to: Kentico CMS 3.x, 4.x