The reason you get this error is because the user needs “read” access to the Master Page Gallery list. Once that is given, and as long as they have the ability to “add and customize pages” in permission levels, creating pages should work great!
Putting Code in your WordPress blogs
2011
Install the Code Markup plugin (from this site).
Wrap your code first in a ‘pre’ tag, then a ‘code’ tag:
<pre>
<code lang="html">
actual code goes here
The important part is the CSS:
pre {
background:#efefef;
border:1px solid #ccc;
padding:5px;
white-space:pre-wrap;
}
Full-Width Page Layout in Sharepoint 2010
2011
Page Layout without the sidebar (Sharepoint 2010)
In order to create a full-width (whatever the width of your container is) page layout in Sharepoint 2010, you’ll want to disable the sidebar. I find this useful for things like calendars and big lists. Because my design is only 960px wide, I find that by the time you add the sidebar in, you’re left with only around 750px of usable space. For a calendar or a big list, it’s just kind of annoying.
So here’s how it’s done:
Create a new page layout in Sharepoint Designer. Add a new control like this:
<asp:Content ContentPlaceholderID="PlaceHolderLeftNavBar" runat="server" />
By declaring an empty control, we tell Sharepoint to ignore that control and not fill it with anything.
Don’t forget to add a bit of CSS in the header to expand your main body panel to the full width.
Simple as that!
note: use this technique to hide other items on the page layout (top navigation, footer, sky’s the limit)
2-Column Page Layout in Sharepoint 2010
2011
You need a two-column page layout for your Sharepoint project. I’ll show you how to do this with and without the sidebar (quick launch) being active.
Step 1: Create a new page layout
I use Sharepoint Designer for this. I’m not even sure it’s possible using anything else.
Step 2: Setup your basic layout in HTML
You can use tables or divs, but in the spirit of the future, let’s use divs.
<div></div>
<div></div>
<br style="clear:both;" />
Step 3: Fill your divs
Inside these divs you can place webpart zones, page fields, or your own code (maybe a specific header for each column?). Whatever you want to do.
Step 4 (optional): Hide the sidebar/quicklaunch
Declare this control anywhere not the page, but leave it empty so nothing will load into it:
<asp:Content ContentPlaceholderID="PlaceHolderLeftNavBar" runat="server" />
Don’t forget to add a bit of CSS in the header to expand your main body panel to the full width.
Step 5: Style the divs so they appear next to each other.
Using CSS we can make sure those divs appear next to each other.
.col-left,
.col-right {
width:400px; /*obviously…play with the width to match your setup*/
float:left;
}
The <br/> tag above should break after the floated elements so everything remains normal in your page layout.
On an unrelated note…
2011
In the middle of cooking dinner last night the gas ran out. What time, you say? Yes, after the bank closes of course. So no refill of gas. Guess what else our gas powers? Yep, our hot water. Joy of all joys I fired up the ‘ol “boiler” on our water dispenser. It makes about 3 cups of hot water, but mixed with enough cold from the shower and you have a fairly respectable little cup-and-bowl bath situation. As respectable as a cup-and-bowl bath can be.
Thank you China…for having a system that dis-allows you to just use gas and pay a bill at the end of the month. Thank you for making me rearrange my day so I have to leave work early in order to make it to the bank on time to sit there and wait for a teller who will reluctantly fill up gas card so I can, once again, take a hot shower. 谢谢.
Ok I’m done.
Master Pages vs. Page Layouts in Sharepoint 2010
2011
For those new to Sharepoint, specifically Sharepoint 2010, here is a primer on the difference between page layouts and master pages.
Master Pages
A master page is what I would normally call something like a template. It holds all of Sharepoint’s necessary elements. It creates containers for your information to load into later. It sets the document structure. An analogy would be an empty bookcase. It’s created a bunch of holding places for different elements. You’ll use some of these elements, and Sharepoint will use the rest. So it’s VERY important to not remove elements in this page unless you really know what you’re doing. You might not need the item, but Sharepoint might need it to run the page correctly.
What Master Pages are used for:
- Calling CSS files
- Installing javascript & other scripts
- Tracking codes (I put my Google Analytics code here)
- Setting top navigation & sidebar functionality
- Things that occur on EVERY page.
What Master Pages are not used for:
- Controlling page-level design and structure
- Webparts and Webpartzones (you can…but I wouldn’t)
- Anything that DOESN”T occur on EVERY page
Page Layouts
In a page layout, you are essentially telling Sharepoint what it should fill all those empty bookshelves with.You declare a control (a certain shelf), and then tell Sharpeoint what goes inside. You can’t go beyond the reaches of the master pages. Whatever controls are on the master page are the controls you can use in a page layout.
What Page Layouts are used for:
- Creating the layout of the pages (within the bounds of the master page)
- Controlling page-level design elements.
- Including page-level css files to override master page styles
- Inserting Webparts and Webpartzones
- Including custom codes (javascript, etc.)
- Things that occur only on this page layout, not site-wide
What Page Layouts are not used for:
- Content. This is not the place to write and display content. You’ll create a page to do that. This is merely to provide the placeholders to do that.
- Applying CSS styles that could be applied at a higher level. You want to keep the management of things like CSS as centralized and high as possible.
A few extra tips:
- You should never need more than 1 master page (unless for some reason you decide you want a different “admin” and “front-end” master page.
- Page layouts should be used sparingly. It can get a bit out of control, so consider what you need and make some generic templates using page layouts that will work for many kinds of pages.
- Don’t put too much extra CSS, javascript, or custom code in page layouts. It can be an enormous task to figure out where a style or a piece of code is coming from if you have master page-level stylesheets, page layout-level stylesheets, and even possibly page-level stylesheets (in a CEWP or something). Try to centralize and simplify.

