SharePoint 2007 Design Tip: Edit Consoles Throw Off Your Design

If you are working with a SharePoint master page and trying to get away from using the multiple tables that the default master page uses, the edit consoles (WSSDesignConsole and PublishingConsole) may create problems for you.

The issue: The WSSDesignConsole and the PublishingConsole are user controls, which means that the interface code for the consoles is stored outside of the master page and is locked down.  The interface code for these consoles starts off with a table row tag (<tr>) and not a table tag (<table>), so the potential end result is your master page rendering differently than what you have specified in the master page code.  The consoles may cause your table cells or rows to end prematurely, thus throwing off your design.

The fix: Inside of the content placeholder, add wrapping table tags (<table>) around the user control.  Here is an example:

<!— — — Edit Consoles — — —>
<!– Edit console that appears in page Edit mode –>
<asp:ContentPlaceHolder ID=”WSSDesignConsole” runat=”server”>
</table>
</asp:ContentPlaceHolder>
<!– Publishing console control –>
<asp:ContentPlaceHolder ID=”SPNavigation” runat=”server”>

PrefixHtml=”&lt;tr&gt;&lt;td colspan=&quot;4&quot; id=&quot;mpdmconsole&quot; class=&quot;ms-consolemptablerow&quot;&gt;”
SuffixHtml=”&lt;/td&gt;&lt;/tr&gt;”>
</SharePoint:DelegateControl>
</asp:ContentPlaceHolder>
<!— — — End of Edit Consoles — — —>

11 thoughts on “SharePoint 2007 Design Tip: Edit Consoles Throw Off Your Design”

  1. Thanks for the tip, i’d that problem for a while, had no real clue why it’s happening and ended up using the old table header.

  2. The other thing to note is that the Publishing Console is a delegate control, and so can be replaced by a feature.I came across the spurious table row issue earlier this week, and was thinking about writing a feature to replace the Publishing Console. I imagine that MOSS will end up like MCMS – that people usually replace the console.If I replace the Publishing Console, I’ll stick it on CodePlex

  3. Heather, I’ll go you one even better! Look at the “PrefixHtml” and “SuffixHtml” parameters. Either add the <table> and </table> tags in there or just strip out what’s there and replace with divs.Good to see you blogging again. Wish I could have made Connections to SharePint with you.

  4. At what point in the MOSS development cycle did someone at Microsoft go “you know, having that web part render invalid partial table markup is an EXCELLENT IDEA!”This is insanse. It’s insane that you figured this out, Heather (though I’m going to be forever grateful now!)Kevin…that’s a great note, too. Thanks for that!” could refraining from using tables in your design prevent this also?”Is that possible!? If so, please expound upon that!I tried in vain to create table-less Masterpages but between core.css, and the fact that MOSS insists that all admin content editing interfaces should be on TOP OF my presentation interface, I couldn’t get everything to cooperate unless I caved in and used at least some basic tables to get page columns and such lined up and working.

  5. Hi ,I would love to have a master page and page layout without any single table . All the layout will be Div base. Let me know if some one has done in sharepoint.Thanks!

  6. Heather,Thanks for all you design help. As a fellow designer/developer, I can really appreciate the level of tedium and tenacity required to unravel the SharePoint mess. I really hope the SharePoint community pushes Microsoft very hard to make substantial markup improvements in the next version.Anyway, to be specific to this post…If you will notice the detail of the publishing console control, you will see “PrefixHTML” and “SuffixHTML” in the markup. If you read the attribute properties, you will see the escaped coding for the opening and closing row and cell tags. I simply add my table open and close to those attributes to prevent “orphan” tags in my master page. Additionally (and I haven’t tried this), but I assume that one could also eliminate the row and cell code and simply use a more CSS friendly tag.Also the Publishing Console is a delagate contorl and it is possible to relatively easily create your own delagate control. If you open the publishing delagate at C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12TEMPLATECONTROLTEMPLATESPublisingConsole.ascx, you can see all the table tag markup and could replace that with more CSS friendly markup in your own delagate – but that sounds like a blog post of its own, no? : )Keep up the great work!

  7. Hi, I have created a custom master page which works fine throughout the MOSS site. But when I click on ‘News Archive’ link, I get the error ‘Form control does not have ControlMode set.’ I am trying to find out the solution since so many days. But haven’t got anything. Its so frustrating! Its urgent now. With all the master pages provided by MOSS, News archive link never gives a problem. But when i select my custom master page for the site, this is always a problem with News Archive link. Any idea, what’s wrong???

  8. thanks man, you are a life saver. I’m new to sharepoint and I tried forever fixing this in vein.

Comments are closed.