Showing posts with label Master Pages. Show all posts
Showing posts with label Master Pages. Show all posts

Wednesday, April 01, 2009

Connecting PPS to MOSS Sub Site Master Pages

When you deploy a dashboard from Performance Point Server you have the option of choosing which master page you want to use. By default you will see all the master pages in the SharePoint master page gallery of the site collection you are publishing too.



If you are in a subsite of your portal unless you have copied your custom master pages to the site collection master page gallery you will only see the default.master in the PPS dropdown since this is the only master page in the subsite master page gallery.

For example:
To solve this simply copy your custom master page to the subsite master page gallery.

Thursday, October 23, 2008

MOSS Page Setting Error - Value does not fall within the expected range

Thanks to these guys for the solution

I found an error when trying to change the Page Settings of a default.aspx in one of my sites today.

I wanted to update the page layout template in use but on selecting Page Settings from either the Page drop down in edit mode or from the Site Content & Structure page i received the follwoing error:

Value does not fall within the expected range
  1. Open the site in SharePoint Designer
  2. Select File / Export and choose the page you are trying to update
  3. Open the page locally using Notepad
  4. Search the source for “mso:PublishingPageLayout"
  5. Look at the path :

    http://mossdev/_catalogs/masterpage/customLayout.aspx, Custom Reports Layout

  6. The string points to my old development environment http://mossdev
  7. Update the path to the live environment eg: http://mosslive
  8. Save the file
  9. In SharePoint Designer select File / Import and choose the modified file
  10. Check the files back in and approve them.
Problem solved - i can now update the page settings with no error.

Friday, June 13, 2008

The type or namespace name 'Publishing' does not exist in the namespace 'Microsoft.SharePoint'

I started playing around with a copy of default.master yesterday and added in a CssRegistration link to the header:

<SharePoint:CssRegistration name="<% $SPUrl:~SiteCollection/Style Library/CustomMySiteRegistration.css %>" runat="server"/>

After deploying the master page to SharePoint i received the following error:

An error occurred during the processing of . c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\dff54803\4595fc0a\App_Web_custommysite.master_1096277560.2bgek7y-.0.cs(1389): error CS0234: The type or namespace name 'Publishing' does not exist in the namespace 'Microsoft.SharePoint' (are you missing an assembly reference?)

Thanks to Tom Meskens for posting the error here's the solution.
The default.master file doen't include the publishing assembly declarations required. They need to be added in as follows:

<%@ Register Tagprefix="PublishingWebControls" Namespace="Microsoft.SharePoint.Publishing.WebControls" Assembly="Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="PublishingNavigation" Namespace="Microsoft.SharePoint.Publishing.Navigation" Assembly="Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="PublishingVariations" TagName="VariationsLabelMenu" src="~/_controltemplates/VariationsLabelMenu.ascx" %>
<%@ Register Tagprefix="PublishingConsole" TagName="Console" src="~/_controltemplates/PublishingConsole.ascx" %>
<%@ Register TagPrefix="PublishingSiteAction" TagName="SiteActionMenu" src="~/_controltemplates/PublishingActionMenu.ascx" %>


Republish the master page and hoorah - no more error!

Saturday, June 23, 2007

Create Page Access Denied

Users need to be in the Readers group for the Master Page Gallery in order to create pages in the portal.

Monday, April 02, 2007

How to set a custom default master page for all site definitions in WSS 3.0

http://blogs.tamtam.nl/mart/HowToSetACustomDefaultMasterpageForAllSiteDefinitionsInWSS3.aspx

In WSS3 you can set the masterpage of a site using SharePoint designer, just rightclick the new masterpage and set it to default.

This method however, does not set all the new created sites with the new masterpage. So, how can we deploy the new masterpage?

  • Put the new masterpage in the following directory: C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\GLOBAL
  • Go to C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\GLOBAL\XML and open de ONET.XML.
  • At the bottom of the page add a new masterpage entry so it will look something like this:

<Modules>

<Module Name="DefaultMasterPage" List="116" Url="_catalogs/masterpage" RootWebOnly="FALSE">

<File Url="[any name].master" Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE" />

<File Url="default.master" Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE" />

</Module>

</Modules>

This code will automatically put your custom masterpage into the masterpage gallery when a new site is created.

  • Change the default masterpage to the new one. Look for the following line: <Configuration ID="0" Name="Default" MasterUrl="_catalogs/masterpage/default.master"> and change it to your new masterpage.
  • Hit save, and do an IISRESET.

Now create a new site and the new master page is set automatically.

Beware that when you create a master page with SharePoint designer you cannot just export the master page to the filesystem, because it will mess up your master page code. You can better copy the master page code to notepad, and save it as your master page on the filesystem.

Setting the master page for My Site (half way there)

Well it works for me so time for a pint then ;)

Actually there's a small breakthrough; it also works for everyone else, but only on the My Profile page.

To do this open My Site in SharePoint Designer and open the Person.aspx file.

At the top of the page change the master page reference to point to your custom master file:

  • MasterPageFile="_catalogs/masterpage/CustomMaster.master"

This should update all My Sites

Creating a Custom Master Page & Deploying it as a Feature

First of all thanks to Heather Soloman who posted a great article about this Create a Feature: Master Pages for Site Collections.

Here's how i set up the Custom Masterpages and depoyed them as a feature:

Create the Feature

  1. Create a folder called CustomMasterPages under the Features directory on the web server.
  2. Inside the CustomMasterPages folder create the folders:
    • en-us
    • Images
    • Styles
    • MasterPages
    • PageLayouts
    • JavaScript
  3. Copy these two files from the Features directory PublishingLayouts:
    • Feature.xml, and
    • ProvisionedFiles.xml
  4. Create a file in the MasterPages folder called CustomMaster.master
  5. Open CustomMaster.master in notepad and paste the following minimal master page code from Microsoft.
  6. Alternatively Heather Soloman has created another version of the minimal master page which is the version I used in the end. The reason for this is that Heather's version is a stripped out version of the default.master master page which includes all the functionality available. The Microsoft version has only the minimal elements included.
  7. Format the master page with XHTML tags & CSS.
  8. Change the doc type to XHTML transitional.

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/transitional.dtd">

  9. Edit the ProvisionedFiles.xml file to provision the master page, CSS files & images etc.


    <!-- _lcid="1033" _version="12.0.4407" _dal="1" -->
    <!-- _LocalBinding -->
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">

    <Module Name="OSGMasterPages" Url="_catalogs/masterpage" Path="MasterPages" RootWebOnly="TRUE">
    <File Url="tr_portalMaster.master" Type="GhostableInLibrary">
    <Property Name="ContentType" Value="Teleport Master Page - DEFAULT PORTAL LAYOUT" />
    <Property Name="PublishingPreviewImage" Value="~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/tr_teleportLogo100.gif, ~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/tr_teleportLogo100.gif" />
    <Property Name="MasterPageDescription" Value="This is the TelePort master page (DEFAULT CSS LAYOUT) for use with collaboration or publishing sites." />
    </File>
    </Module>
    <Module Name="PublishingLayoutsPreviewImages" Url="_catalogs/masterpage" IncludeFolders="??-??" Path="" RootWebOnly="TRUE">
    <File Url="tr_teleportLogo100.gif" Name="Preview Images/tr_teleportLogo100.gif" Type="GhostableInLibrary">
    </File>
    </Module>
    <Module Name="Images" Url="Style Library/Images" Path="Images" RootWebOnly="TRUE">
    <File Url="tr_telerealLogo102.gif" Name="tr_telerealLogo102.gif" Type="GhostableInLibrary" />
    </Module>
    <Module Name="OSGStyles" Url="Style Library" Path="Styles" RootWebOnly="TRUE">
    <File Url="tr_core.css" Type="GhostableInLibrary" />
    <File Url="tr_portalMaster.css" Type="GhostableInLibrary" />
    <File Url="tr_portalMaster_IE6.css" Type="GhostableInLibrary" />
    <File Url="tr_portalMaster_IE55.css" Type="GhostableInLibrary" />
    </Module>
    </Elements>

  10. Add a preview image to the language folder (en-us).
  11. Create a unique GUID
  12. In the Feature.xml file:
    • Change the feature ID to the unique GUID
    • Change the title to Custom Master Pages
    • Change the Hidden state to False
  13. Recycle the app pool on the WFE website

Deploying the Feature

  1. On the web server (DEV02) launch command prompt and change dir to:

    cd C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN

  2. Install the feature using STSADM:

    stsadm -o installfeature -name CustomMasterPages

  3. Go to Site Collection Features on the portal top level site and activate the feature.

    To use the master page select from the drop down list on Site Settings / Site Master Page Settings

Redeploying a Feature

Changes made to the feature require that the feature is redeployed. For example; adding new master pages, css files etc. To do this:

  1. On the web server (DEV02) launch command prompt and change dir to:

    cd C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN

  2. Reinstall the feature using STSADM:

    stsadm -o installfeature -name CustomMasterPages -force

  3. Reactivate the feature in Site Collection Features by deavctivating and the activating it.