0

我正在开发一个自定义顶部菜单,并希望为每个站点地图页面添加一张图片。我像下面的附图一样编写了模块。在这个结构中,我将 sitefinity 页面名称输入到 Title 字段并在代码隐藏中拍摄图像。但这种用法不是动态的。

我的问题是如何生成结构来显示哪个图像与哪个站点地图页面一起使用?是否有任何字段或组件可以显示自定义模块中的所有站点地图页面?

谢谢...

4

1 回答 1

0

I would recommend looking at this the only difference would be you need the image selector type which is <sitefinity:ImageField ID="ImageSelector" runat="server" DisplayMode="Write" UploadMode="Dialog" DataFieldName="Image" />

Then on in your custom menu widget you will need to add the codebehind and attach to the TabDataBoundEvent event of the navigation type you have chosen.
in CS Telerik

protected void RadTabStrip1_TabDataBound(object sender,
Telerik.Web.UI.RadTabStripEventArgs e)
{
e.Tab.ToolTip ="Read more about " +
(string) DataBinder.Eval(e.Tab.DataItem, "Text");
}

Once you get "e" you should be able to get at your custom fields but either looking up the page via a GUID or possibly right from this. Good Luck

于 2013-03-20T17:52:29.843 回答