| Author |
Re-format DHTML Global Navigation
|
|
|
| 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
| |
|
| 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
| |
|
| 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
| |
|
|
|
|