Some weeks ago, the Accessibility Kit for SharePoint (AKS)
was released. Unfortunately the AKS didn't solve all our problems. If you try to build a public website with Micorsoft Office SharePoint Server 2007 (MOSS) and pay attention to a clean structure of your HTML code (say: no table), perhaps this piece of code you help you!
When you place WebParts on your public website, then these WebParts are rendered in a HTML TABLE
. This is because WebParts are placed in a WebPartZone
and these are rendered with tables.
This behavior can be fixed with a ControlAdapter. Our ControlAdapter render the WebPartZone in a HTML DIV, if the user (logged-in or anonymous) is viewing the page. If the author edits the page, then the WebPartZone is rendered the "traditional" way. With this trick, we have a clean and modern HTML structure and the author have still all the (drag&drop-) functionality while editing the page.
Copy the following C# code in a file called AKS_WebPartZone_Adapter.cs and place it in the AppCode directory under your server root directory (like C:\Inetpub\wwwroot or C:\Inetpub\wwwroot\wss\VirtualDirectories\80).
Now you have to edit the compat.browser file which in the AppBrowser directory located in your server directory and add the following piece of code after the opening tag: