|
Rank: Advanced Member Groups: Member
Joined: 6/5/2007 Posts: 76
|
I would like to be able to build the slider at runtime or to build it from an xml source.
The reason is so that I can add/remove menu items without having to edit the code on the aspx page directly. Either via an external xml file (preferable) or via code behind.
Can it do that?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
|
|
Rank: Advanced Member Groups: Member
Joined: 6/5/2007 Posts: 76
|
Thanks
Could you post a sample XML file structure for the slider menu. Outlook 2003 template?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi Paul, It's a little bit more complicate than the XML file for that template. You will need to specify the XML file and also specify which XML attributes goes into which node property. You can find more details at here: http://www.essentialobjects.com/ViewDoc.aspx?t=MenuCommon%2fDataBinding%2fpopulate_datasource.htmlThanks
|
|
Rank: Advanced Member Groups: Member
Joined: 6/5/2007 Posts: 76
|
"also specify which XML attributes goes into which node property"
Thanks
I have a basic version working with it, but how to I put icon images into the menu.
XML file:
<?xml version="1.0" encoding="utf-8" ?> <items> <category title="Slide 1"> <category title="Item 1" url="~/url.aspx" /> <category title="Item 2" url="~/url.aspx" /> <category title="Item 3" url="~/url.aspx" /> <category title="Item 4" url="~~/url.aspx" /> <category title="Item 5" url="~/url.aspx" /> </category> <category title="Slide 2"> <category title="Item 1" url="~/url.aspx" /> <category title="Item 2" url="~/url.aspx" /> <category title="Item 3" url="~/url.aspx" /> <category title="Item 4" url="~/url.aspx" /> <category title="Item 5" url="~/url.aspx" /> </category> </items>
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi Paul,
Please go over the documentation that I previous posted. It explained how to do it in detail.
Thanks
|
|
Rank: Advanced Member Groups: Member
Joined: 6/5/2007 Posts: 76
|
I have, but can't find it. I can see title, description, url and roles, but nothing about icons.
I'm not that familiar with XML and don't understand half of what the online instructions mean.
|
|
Rank: Advanced Member Groups: Member
Joined: 6/5/2007 Posts: 76
|
Got it :-)
For the XML challenged here it is:
XML File: <?xml version="1.0" encoding="utf-8" ?> <items> <category title="Slide 1" LeftIcon="~/wce/images/16x16/admin.gif"> <category title="Item 1" url="~/url.aspx" LeftIcon="~/wce/images/16x16/admin.gif" /> <category title="Item 2" url="~/url.aspx" /> <category title="Item 3" url="~/url.aspx" /> <category title="Item 4" url="~~/url.aspx" /> <category title="Item 5" url="~/url.aspx" /> </category> <category title="Slide 2"> <category title="Item 1" url="~/url.aspx" /> <category title="Item 2" url="~/url.aspx" /> <category title="Item 3" url="~/url.aspx" /> <category title="Item 4" url="~~/url.aspx" /> <category title="Item 5" url="~/url.aspx" /> </category> </items>
.NET CODE: <asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/cpmenu.xml" XPath="/*/*"> </asp:XmlDataSource>
<eo:SlideMenu ID="SlideMenu1" runat="server" Width="200px" DataSourceID="XmlDataSource1" ControlSkinID="None" SlidePaneHeight="170"> <LookItems> <eo:MenuItem ItemID="_TopGroup"> <SubMenu Style-CssText="border-right: #002d96 1px solid; border-top: #002d96 1px solid; font-weight: bold; font-size: 11px; border-left: #002d96 1px solid; cursor: hand; font-family: tahoma"> </SubMenu> </eo:MenuItem> <eo:MenuItem Height="31" HoverStyle-CssText="border-bottom: #002d96 1px solid" Image-ExpandedUrl="00000502" Image-HoverUrl="00000501" Image-Mode="ItemBackground" Image-Url="00000500" ItemID="_TopLevelItem" LeftIcon-Padding-Left="6" NormalStyle-CssText="border-bottom: #002d96 1px solid"> <SubMenu Style-CssText="padding-right: 10px; padding-left: 10px; font-size: 11px; padding-bottom: 2px; padding-top: 2px; border-bottom: #002d96 1px solid; font-family: tahoma"> </SubMenu> </eo:MenuItem> <eo:MenuItem Height="20" HoverStyle-CssText="font-weight: normal; text-decoration: underline" ItemID="_Default" LeftIcon-Padding-Right="5" NormalStyle-CssText="font-weight: normal; text-decoration: none"> </eo:MenuItem> <eo:MenuItem Height="20" ItemID="plain_text" LeftIcon-Padding-Right="5" NormalStyle-CssText="font-weight: normal;" Text-NoWrap="False"> </eo:MenuItem> </LookItems> <TopGroup> <Bindings> <eo:DataBinding DataField="@LeftIcon" Property="LeftIcon_Url" /> </Bindings> </TopGroup>
</eo:SlideMenu>
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Good job, Paul :)
Feel free to let me know if you have other questions.
Thanks.
|
|