willemschwarte

Part 1:

I can't seem to change the master page for a single page.

I use a Publishing site template. I have created a new content type, derived
from publishing page / page (or page layout, tried both).
Next in Sharepoint Desinger (SPD) I create a new Page Layout (Sharepoint
Content). Here the masterpage from the site collection
is automaticlally used.

Next I create a new Page through the Sharepoint Web Interface (my sharepoint
publishing site), through Site Actions / Create Page.

Now in SPD I select the newly created Page and select Master Page -> Attach
Master Page from the Format Menu.
I select specific Master Page and select a different master page (sometimes
I cannot browse to the masterpage folder, it is invisible sometimes, also
don't know why).
Now in SPD I see the page with the different master page.

If I open the site in a browser the default master page is used.

You would think that this would be fairly simple to implement, could
somebody help me out with this.



Part 2:

We are now using a workaround for this problem, but this creates another
problem for us.

E.g. we have 3 pages (A, B and C), all 3 will have a slightly different
layout, so we need 3 Master Pages. As stated in Part 1, we could not
accomplish this.
We decided to create to subsites for pages B and C and give them a different
master page through the site settings. This works ok.

But the problem now is the breadcrumb.

if we go to a page from subsite B the breadcrumb looks like:

siteA->siteB->aboutus.aspx

to site C

siteA->siteC->whoarewe.aspx

in site A:

siteA->home.aspx


obviously we would like that siteB and siteA are removed from the
breadcrumb, because we only used these to get the master page settings right.

Is this possible

thanks...


Re: SharePoint - Design and Customization [Sharepoint 2007] set a masterpage on page level

rick postmus

If you open a new page you have the following line(or simular):
<%@ Page language="C#" MasterPageFile="_catalogs/masterpage/default.master" Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage,Microsoft.SharePoint,Version=12.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" metaStick out tonguerogid="SharePoint.WebPartPage.Document" %>

Did you try to edit the MasterPageFile part

Remember to back-up/copy everything before you lose data.

Greetz,
Rick




Re: SharePoint - Design and Customization [Sharepoint 2007] set a masterpage on page level

Eric van Uum

Hello Willem,

I'm not sure whether I', to late with my response, but here it goes.

  1. It is not possible in Sharepoint to have a different Masterpage on page level, even if you change the page directive. Only on Site level. As you've already noticed.

    You have actually gone for a possible solution, but that creates the problem of the breadcrumb.
    The default Sharepoint breadcrumb control uses the CurrentNavSiteMapProviderNoEncode as the sitemap provider. This provider always returns the current structure of the Sharepiont Site collection and its subsites.
    -- [html in masterpage]
    <asp:ContentPlaceHolder id="PlaceHolderTitleBreadcrumb" runat="server">
    <div class="breadcrumb">
    <aspTongue TiediteMapPath ID="siteMapPath" Runat="server" SiteMapProvider="CurrentNavSiteMapProviderNoEncode"
    RenderCurrentNodeAsLink="false" CurrentNodeStyle-CssClass="breadcrumbCurrent" NodeStyle-CssClass="ms-sitemapdirectional"/>
    </div>
    </asp:ContentPlaceHolder>
    ---

    You can replace this with an other provider, for instance one based on the web.sitemap file. The only disadvantage of such an approach is that you have to maintain that file manually. And changes in the site structure by users (adding pages/sites etc.) will not be reflected in the provider. It is also possible to create a provider that will allow you to set the branchlevel for a page through page settings (for instance by adding a column to the content type, where you store that information and display it using your own provider).

    How to create your own provider can be found here http://msdn2.microsoft.com/en-us/library/aa479033.aspx.

  2. There is also a simpler method then all of the above. Make use of page template instead of master pages to allow for minor differences between pages. It is possible in a page template to overwrite masterpage behaviour. You can then have diffenrent page layouts in the same site with the same master page. But this does require that you use MOSS 2007 instead of WSS 3.0

Hope this helps.






Re: SharePoint - Design and Customization [Sharepoint 2007] set a masterpage on page level

willemschwarte

Eric van Uum wrote:

Hello Willem,

I'm not sure whether I', to late with my response, but here it goes.

  1. There is also a simpler method then all of the above. Make use of page template instead of master pages to allow for minor differences between pages. It is possible in a page template to overwrite masterpage behaviour. You can then have diffenrent page layouts in the same site with the same master page. But this does require that you use MOSS 2007 instead of WSS 3.0

Hope this helps.

Hi,

this seems like our solution, because we would like to use as much of the in-box functionality of sharepoint as possible, after all it is a huge amount of money for the server product, so why program simple things yourself.

We are using MOSS 2007 [enterprise edition]. I know of templates,but they are the site templates you choose when creating a site collection. I am not aware that it is possible to have a different template for a single page.

Could you please point me out where to look for this, and how to set a template in the settings off the page

ps. are you dutch





Re: SharePoint - Design and Customization [Sharepoint 2007] set a masterpage on page level

rick postmus

By going to "Siteacties" > "Site-instellingen" and under the heading "Uiterlijk" is the link "Site opslaan als sjabloon" This way you can make your own templates. When making a new site you can then choose the template you created.




Re: SharePoint - Design and Customization [Sharepoint 2007] set a masterpage on page level

willemschwarte

rick postmus533099 wrote:
By going to "Siteacties" > "Site-instellingen" and under the heading "Uiterlijk" is the link "Site opslaan als sjabloon" This way you can make your own templates. When making a new site you can then choose the template you created.

Okay, but then you will apply a template for the entire site I just need to apply a template for a single Page in a Site.

e.g. I have 3 pages,

1. Full colored page Without Menu Navigation

2. Some images grayed without menu navigation

3. Some images grayed WITH menu navigation.

How would I accomplish this most easy

thanks.





Re: SharePoint - Design and Customization [Sharepoint 2007] set a masterpage on page level

Curtis Ruppe

I don't speak that language, so let me state what I have to state, keeping in mind, I might just restate what has already been stated.

Pages in MOSS 2007 use a Page Layout.

Page Layout's use the site master page.

It is preferred you create your own Page Layout page, if you want to refine the structure of your individual custom pages, but you will still be within the constraints of the site master page.

Basically Page Layouts are there for two basic reasons.

  • To specify locations for web parts
  • To specify Web Content Management Placeholders.

You can create your own Page Layout using SharePoint designer by going to the Site Actions -> Site Settings -> Modify All Site Settings link, followed up by clicking on Master page and Page Layouts Gallery. There you can create your new page or modify as necessary (using SPD if you want). The BlankWebPartPage is the most basic Page Layout page there, if you want to start from a copy.

You can always, as a last alternative, create your own masterpage anyway. Keep in mind, though, that if somebody resets the Master Page file within the site, it might very well reck your customized pages.





Re: SharePoint - Design and Customization [Sharepoint 2007] set a masterpage on page level

Andy-H

willemschwarte wrote:

Okay, but then you will apply a template for the entire site I just need to apply a template for a single Page in a Site.

e.g. I have 3 pages,

1. Full colored page Without Menu Navigation

2. Some images grayed without menu navigation

3. Some images grayed WITH menu navigation.

How would I accomplish this most easy

thanks.

This page gives another approach you could consider using (take a look at the 'Change Masterpage on the fly'). You can at a page layout level override the master page you want to have attached to it, so all pages that are based on that page layout will always use the master page you define. Requires a little programming rather than customisation but it is relatively easy to do once you get going.

I'd imagine you'd create your master pages with the structure you want, create your class that will change the master page with what ever method you choose (eg: reading a parameter, or even a different class for each of the three layouts you want with the master pages hardcoded), create three page layouts that inherit your new class(es) and then when creating pages in SharePoint select the page layout you need.

Hope that helps.





Re: SharePoint - Design and Customization [Sharepoint 2007] set a masterpage on page level

willemschwarte

Thanks, that is a really interesting link you just posted, gonna look into that one. The problem of the MP's is solved. Thanks all!