locked
Different output of MenuAdapter- and SharePoint:AspMenu-control RRS feed

  • Question

  • User-190303387 posted

    Hello,

    I've just integrated the CSS Friendly Control Adapters into SharePoint. Now I'm wondering if it is right that the output of the standard SharePoint:AspMenu Control differs from the outpot of the CSSFriendly:MenuAdapter with the AdapterEnabled attribute set to "false". I thought the control's output is only affected if the attribute is set to "true". Especially the single menu items appear in a different form.

     
    Here are two short output examples of each control:

    SharePoint:AspMenu Menu Item

    <table width="100%" cellspacing="0" cellpadding="0" border="0" class="leftNav1 zz2_left_7">
    <tbody>
    <tr>
    <td style="width: 100%;">
    <a class="zz2_left_1 leftNav1 zz2_left_6" href="/_layouts/viewlsts.aspx?BaseType=1" accesskey="3" style="border-style: none; font-size: 1em;">
    Menu Item
    </a>
    </td>
    </tr>
    </tbody>
    </table>
      

    CSSFriendly:MenuAdapter Menu Item

    <span class="leftNav1 zz2_left_7" title="Homepage mit Firmennachrichten">
    <a style="border-style: none; font-size: 1em;" href="/News/Seiten/Default.aspx" class="zz2_left_1 leftNav1 zz2_left_6">
    Menu Item
    </a>
    </span>
    <br />

     
    Beside the different output format for each menu item the CSSFriendly:MenuAdapter returns the menu without an outer table. So is there any option to force the MenuAdapter control  to return the normal menu layout like the SharePoint:AspMenu control if the EnableAdapter attribute is set to false?

     

    Bye,

    Flo
     

    Thursday, December 20, 2007 11:01 AM

All replies

  • User-190303387 posted

    Push!

     Has no one an idea, where the difference comes from?
     

    Monday, January 7, 2008 8:36 AM
  • User-656867934 posted

    The System.Web.UI.WebControls.Adapters.MenuAdapter will still modify the output of both SharePoint:AspMenu and asp:Menu.

    Because CSSFriendly:MenuAdapter inherits from System.Web.UI.WebControls.Adapters.MenuAdapter, setting EnableAdapter in the CSSFriendly:MenuAdapter control has no effect.

    What I've done in the past is use the MossMenu control, then use the CSS Friendly Menu Adapter to adapt only that control. That has worked for me, as there were only a couple of instances of SharePoint:AspMenu that I wanted to adapt.

    Wednesday, January 16, 2008 2:29 PM
  • User1788026036 posted

     Hi Mike,

    I have implemented the MOSSMenu control, but am having issues with the CSS Adapters.

    <browsers>
      <browser refID="Default">
        <controlAdapters>
          <adapter controlType="AJK.Controls.MossMenu"
                   adapterType="CSSFriendly.MenuAdapter, GenI.CSSAdapterLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b321067392cd10a3" />
        </controlAdapters>
      </browser>
    </browsers>

    When I run the  aspnet_regbrowsers -i

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regbrowsers -i
    Utility to compile ASP.Net browser files.
    Copyright (C) Microsoft Corporation. All rights reserved.
    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\browsers\CSSFriendlyAdapters.browser(4): ASPCONFIG: Could not load type 'AJK.Controls.MossMenu' from assembly 'System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

     

    Can you please help me with some pointers, how did you modified the  C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\Browsers\CSSFriendlyAdapters.browser file.

    TIA

    Cheers,

    Ajay 

    Monday, January 21, 2008 8:39 PM
  • User1788026036 posted

    Hi ,

    This is fixed, I needed to write the full 4-part assembly information after the AJK.Controls.MossMenu element

     

    Cheers

    A

    Wednesday, January 23, 2008 5:35 PM
  • User1821599688 posted

     Thank you for your message,

     

    but is it possible to automate the process of  making cssFriendly adapter for MossMenu such as aspnet_regbrowsers –i and making the change in the compactbrowser files ?

     

    Thanks.

     

     

    Wednesday, July 30, 2008 4:14 PM