Microsoft Content Management Server - Re-format DHTML Global Navigation

This is Interesting: Free IT Magazines  
Home > Archive > Microsoft Content Management Server > March 2006 > Re-format DHTML Global Navigation





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re-format DHTML Global Navigation
Ajay

2005-07-26, 7:56 am

Hi,

Does anyone have any information on how I can take the supplied header menu
that comes with the Woodgrove Net web site (the one that renders items using
DIV elements) and re-format it so that the top level channels are in a
vertical format?

The goal is to take that menu and place it on the left hand side of all the
templates.

Thanks for any information and references,

Ajay
Ajay

2005-07-27, 2:48 am

The code that controls the formatting seems to be in this function:

protected override void Render(HTMLTextWriter writer)

in the file McmsDhtmlGlobalNavigation.cs

But if I try altering the HTML that's entered into "writer", it doesn't show
up in the HTML source of the final page. I'm just trying to shove in a few
<BR> elements and other little things as a test.

Am I looking at the right section of code?

Ajay

"Ajay" wrote:

> Hi,
>
> Does anyone have any information on how I can take the supplied header menu
> that comes with the Woodgrove Net web site (the one that renders items using
> DIV elements) and re-format it so that the top level channels are in a
> vertical format?
>
> The goal is to take that menu and place it on the left hand side of all the
> templates.
>
> Thanks for any information and references,
>
> Ajay

Ajay

2005-09-12, 6:07 pm

Hi Satish,

I have since found an alternative solution, but I'll make a copy of your
response as it could be very useful in the future.

Thanks,

Ajay

"satish" wrote:
[vbcol=seagreen]
> Hi Ajay,
>
> you can change the DHTML Global Navigation to display menu items vertically
> by changing the code in the Render method.
>
> you need to do changes such that each subchannel under base channel should
> be added to a seperate row in a table under div like below
>
> writer.Write("<div nowrap=\"nowrap\" id=\"menu" + nV + "\"
> class=\"MenuItem\" >");
> writer.Write("<table border=\"0\" cellpadding=\"2\" cellspacing=\"2\">");
>
> foreach (Channel objNavChannel in objBaseChannel.Channels)
> {
> writer.Write("<tr>");
> if(objNavChannel.Channels.Count > 0)
> {
> writer.Write("<td onMouseOver=\"BuildMenu(" + objNavChannel.Name +
> ")\";><span nowrap=\"nowrap\" class=\"MenuItemBox\">" +
> HttpUtility.HtmlEncode(objNavChannel.DisplayName) + "</span></td></tr>");
> }
> else
> {
> writer.Write("<td onClick=\"ShowDefault(" + objNavChannel.Name +
> ")\";><span nowrap=\"nowrap\" class=\"MenuItemBox\">" +
> HttpUtility.HtmlEncode(objNavChannel.DisplayName) + "</span></td></tr>");
> }
> }
> writer.Write("</table>" + NewLine + NewLine);
> writer.Write("</div>");
>
> "Ajay" wrote:
>
david webb

2006-03-13, 8:47 pm

Ajay
what was the alternative solution that you found yourself? i am having the
same problem trying to change the navigation from horizontal to vertical

Thanks
David
Ajay

2006-03-15, 7:48 am

I probably should have been clearer.

I tried this menu by Venkat Eswaran:

http://www.codeproject.com/aspnet/Combo_control.asp

Also had a quick browse on that sight - this one could be useful too:

http://www.codeproject.com/html/dmenusimple.asp

Hope this helps,

Ajay

"david webb" wrote:

> Ajay
> what was the alternative solution that you found yourself? i am having the
> same problem trying to change the navigation from horizontal to vertical
>
> Thanks
> David
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com