Tag Archives: edit mode panel

Edit mode panel does not render at all on system pages

18 Jul

This one is a pretty odd one.

we had the need to emit some different css based on if a page was in edit mode or in display mode on a recent project, and so we put two edit mode panels on the master page.

one with PageDisplayMode set to display.. and the coresponding HTML that we wanted to render..

and another edit mode panel set to edit that renders the other one.

Now, keep in mind there are only two settings for that flag. display or edit.

Worked great, went to our pages, detail pages, list pages, web part pages etc.. edited the page.. and all the changes we expected to see were there and happy.

Now, I repeat, keep in mind there are ONLY two settings for that flag. display or edit.

We then went to a system page, view all site content or site settings.. and the branding/design was ALL kinds of messed up? what gives?

As it turns out, the edit mode panel for some reason.. rendered nothing.

neither edit mode panel was rendered. Which I would have *assumed* would have been impossible since we had a panel configured for every possible option. and Since this was the same master page everything else was using.

and so since this is SharePoint.. my assumptions were wrong.

So there is either a secret third option? or some weird change that only the system pages make.

I don’t know, we ended up finding another approach that did not use edit mode panels.. but this was something I could not find any blog posts about.

So heads up. Edit model panels.. on master pages.. don’t render at all on certain system pages.