How to add Custom Style Sheet CSS to your masterpage file

By peter.stilgoe









Edit your masterpage file, In the tag add a link to your custom CSS file just above the content place holder named “PlaceHolderAdditonalPageHead” ie.

<link href="/Style%20Library/mystyle.css" rel="stylesheet" type="text/css" />

Share

Leggi tutto

Sharepoint 2010: Custom master page messes up positioning of your pop dialog boxes

By peter.stilgoe









When you apply a custom master page you may find that it knocks out the positioning of your dialog boxes & you can no longer see the OK & Cancel buttons beacuse they have been knocked down the page. This is because now your new masterpage shiny banner (in my case) is also displaying in the dialog box. To stop this happening is nice & easy thanks to Microsoft:

Simply add ‘s4-notdlg’ to the class ie.


becomes

Share

Leggi tutto

Sharepoint 2010: Referencing CSS files from Masterpages

By peter.stilgoe









Here are some of the most common ways to reference your custom CSS for SharePoint 2010. One key change over 2007 is the ability to specify After=”corev4.css” in the CssRegistration to make sure your custom CSS is referenced after the OOTB corev4.css file.

http://erikswenson.blogspot.com/2010/01/sharepoint-2010-css-references-in.html

Share

Leggi tutto

After restoring a site collection to a new location you get error The file /_catalogs/masterpage/blahblah.aspx does not exist.

By peter.stilgoe









How To Fix Publishing Pages Page Layout URL

The scenario when moving you want to move a publishing site collection that is your root site collection to a new location

ie http://rootsc —> http://sites/rootsc

You expect a simple backup & restore to the new location to do the job. However once your restore is complete you try to load your site collection in its new location & you get:

The resource cannot be found.

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

You click ‘View Source’ in IE & you get:

The file /_catalogs/masterpage/blahblah.aspx does not exist.
at Microsoft.SharePoint.ApplicationRuntime.SPRequestModuleData.GetWebPartPageData(HttpContext context, String path, Boolean throwIfFileNotFound)

The problem is that your publishing pages are still looking at the old location for the master page files etc using the old URL. Fortunately Gary Lapointe MVP has written a script to parse through the whole site collection & update the paths accordingly.

The utility runs as an STSADM command & is called gl-fixpublishingpagespagelayouturl

Read more about it & download it here

Share

Leggi tutto