回答済み First attempt at branding ...question on how to proceed...

  • 2012年8月21日 22:00
     
     

    Hello,

    I've created a new site collection based on the Teamsite template.  I would now like to tweak the system in two ways:

    1. I want to modify the master file so that instead of the default "homepageSamplePhoto.jpg" it shows a custom image that I have added to "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\IMAGES"
    2. I want any new subsites that are created using the Teamsite template to also show my custom image (without having to change it every time)

    I'm having trouble finding where I need to make the modifications.  I understand that the v4.master provides the master template and it contains the placeholder "PlaceHolderMain" which is the placeholder that is replaced with the content page that contains the image I want to replace (from what I understand). 

    What I can't seem to figure out is how I determine where the actual content page is that is put into "PlaceHolderMain" when the page is rendered and how I replace that with custom content...

    Everything I have found so far shows how to modify the v4.master by hard-coding things like the page name or moving place holders around, but nothing talks about how to actually find the content pages that replace the actual place holders and how to replace that content with custom content.

    Or else I am missing something....?

    Any pointers would be appreciated.

    Thanks

すべての返信

  • 2012年8月22日 2:21
     
     回答済み

    Hi!

    No easy answer on this. - The rendering process of SharePoint gets data from the file system and the database too and combines them. the master  page has a representation in the file system but in the database too. if you change the master page by SharePoint Desginer only the version in the database is used for rendering.

    The content pages define only small pieces of data that are rendered by merging them into the master page (and "page layouts" if you have a publishing site).

    There is no simple way to change the standard image of the teamsite template *in a supported way*. You could create a new site, modify them and save it as new template that can be used for new sites / subsites.

    Just create a new teamsite. Upload the picture into a document library and link to it. Modify the homepage. Than go to "Site Settings" and search for "Save as template". 

    Everything else is another "level" of SharePoint customization. - Not complicated, but not easy to start with the first time.

    Kind regards
    Ingo

    • 回答としてマーク rtmystic 2012年8月22日 3:46
    •  
  • 2012年8月22日 2:29
     
     回答済み

    > actual content page is that is put into "PlaceHolderMain"

    The "homepageSamplePhoto.jpg" is not being displayed by the master page. It is displayed through the "/SitePages/Home.aspx" page. This page is loaded by the default site definition.

    I think what you are asking is how to chage the default Home.aspx page so that it uses your image.

    > I want any new subsites that are created using the Teamsite template to also show my custom image (without having to change it every time)

    Could you just overwrite the "homepageSamplePhoto.jpg" file with your file using the same name?

    You could also just change a site with your new image and any other changes, save the site as a template and then create new sites from that template.


    Mike Smith TechTrainingNotes.blogspot.com

    • 回答としてマーク rtmystic 2012年8月22日 3:46
    •  
  • 2012年8月22日 3:45
     
     

    Thanks...I guess then that is where I'm missing something.  I was trying to figure what is loaded to replace the various place holders.  How would I know that "PlaceHolderMain" is being pulled from home.aspx? Is there some connection somewhere that tells you this?  Does that make sense?

    Also, do you know of any good step by step tutorial somewhere on this that goes beyond the very superficial "just replace the site name" somewhere?  Everything I have found so far seems to either be very superficial or else seems to gloss over a bunch of details.

    I suppose I can use the approach of modifying the page layout through the browser and then template that layout as you describe

    Thanks

  • 2012年8月22日 3:58
     
     

    Hi!

    There are good books out there. Look for something "Beginning SharePoint Designer 2010" (or so). It describes basics in SharePoint Customization if I remember correctly!

    Regards

    Ingo

  • 2012年8月22日 22:09
     
     

    Placeholdermain is defined in the master page: <asp:ContentPlaceHolder id="PlaceHolderMain" runat="server">

    Content is supplied by a content page with a content tag that refers to PlaceHolderMain:  <asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server"> ...content...  </asp:Content>

     

    Some placeholders are defined in the master page that are rarely updated from a content page. An example is the left navigation area (Quick Launch, etc) where the master page defines the placeholder and supplies the default content. Some pages, such as a Basic Page or a Web Part Page, hide this area by suppling an empty <asp:Content> tag.

    As Ingo said, there are many books available. Go to Amazon or other book site and search for "SharePoint Designer", "SharePoint Customization" or "SharePoint Branding" and read the outlines and reviews.  As an instructor I would be remiss if I did not also mention the classes available for SharePoint Designer, customization and branding!


    Mike Smith TechTrainingNotes.blogspot.com