Example #1
0
		private void ProcessNode(DNNNode dnnNode)
		{
			if (!dnnNode.IsBreak)
			{
				var action = FindAction(Convert.ToInt32(dnnNode.Key));
				if (action != null)
				{
					dnnNode.set_CustomAttribute("CommandName", action.CommandName);
					dnnNode.set_CustomAttribute("CommandArgument", action.CommandArgument);
				}
			}

			if (!String.IsNullOrEmpty(dnnNode.JSFunction))
			{
				dnnNode.JSFunction = string.Format(
					"if({0}){{{1}}};",
					dnnNode.JSFunction,
					Page.ClientScript.GetPostBackEventReference(navProvider.NavigationControl, dnnNode.ID));
			}

			foreach (DNNNode node in dnnNode.DNNNodes)
			{
				ProcessNode(node);
			}
		}