temp
temp

Reputation: 19

adding image to sitemap pages in custom module

I'm developing a custom top menu and want to add one picture per sitemap pages. I writed module like following attached image. In this structure, I enter sitefinity page name to Title fields and take images in codebehind. But this usage is not dynamical.

My question is how can I generate the structure that will show me which image goes with which site map page? Is there any fields or component that will show all sitemap pages in custom module?

Thanks...

Upvotes: 0

Views: 107

Answers (1)

Jon R.
Jon R.

Reputation: 999

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

Upvotes: 0

Related Questions