ASPX templates
Version 3.x > ASPX templates > How to implement a Main menu with a datalist? View modes: 
User avatar
Member
Member
Rrij - 8/28/2008 10:16:51 AM
   
How to implement a Main menu with a datalist?
Hi,

What is the classname necessary to implement a menu using a datalist?

I'm using this guide to do it but I'm stuck.


DataSet ds = TreeHelper.SelectNodes("/%", false, "CMS.Product", "", "ProductName", -1, true);
BasicDataList1.DataSource = ds;
BasicDataList1.DataBind();


I know that that code is for products but I guess is for the same propose like the menu. If that isn't the approach which it is?

User avatar
Member
Member
Rrij - 8/29/2008 8:33:14 AM
   
RE:How to implement a Main menu with a datalist?
Any help?

User avatar
Kentico Developer
Kentico Developer
kentico_martind - 9/1/2008 12:14:24 PM
   
RE:How to implement a Main menu with a datalist?
Hello,

If you want to display documents of type 'MenuItem' in datalist, please try to use sample code bellow:

DataSet ds = TreeHelper.SelectNodes("/%", false, "CMS.MenuItem", "", "DocumentName", -1, true);

Best Regards,

Martin Dobsicek

User avatar
Member
Member
Rrij - 9/4/2008 3:13:17 PM
   
RE:How to implement a Main menu with a datalist?
Thanks for that bout now I'm having problem with the names and url of each hyperlinks, can you send me a simple example?

Thanks