Master page creation is actually a relatively basic task, but few people are skilled in creating flexible and complete master pages .. Why? There are several reasons for the analysis. The main problem should be that the master page creation is between development and art. The developers pay attention to the Code and the artist pays attention to the interface effect, I ignored and avoided this part, and I am not willing to do anything ..
First, the moss master page is also from the Asp.net master page, the principle is the same.
Based on the documents provided by Microsoft, there are two ways to create a master page: 1. modify the original master page when the layout does not change much; 2. Recreate the master page.
Let's talk about re-production ..
The simplest understanding is:
First, the crowdsourced security testing shows which elements are required on the parent page;
Second, get the Display Effect and HTML layout of the interface from the artist, and the CSS style sheet;
Third, create a new master page from Spd and copy the HTML code;
Fourth, place CSS in the corresponding location, and apply the corresponding CSS to the master page;
Fifth, replace the controls simulated by the artist with placeholders on the master page;
Sixth, in addition to the required elements, what additional controls need to be added to the corresponding position;
Done!
The following describes each step in detail:
I. What are necessary elements in the parent board page?
Blank, master pages without styles including all placeholders:
<% -- Identifies this page as a. Master page written in C # And registers tag prefixes, namespaces, assemblies, and controls. -- %>
<% @ Master language = "C #" %>
<! Doctype HTML public "-// W3C // dtd html 4.01 transitional // en" "http://www.w3.org/TR/html4/loose.dtd">
<% @ Import namespace = "Microsoft. SharePoint" %>
<% @ Register tagprefix = "spswc" namespace = "Microsoft. sharepoint. portal. webcontrols "assembly =" Microsoft. sharepoint. portal, version = 12.0.0.0, culture = neutral, publickeytoken = 71e9bce111e9429c "%>
<% @ Register tagprefix = "SharePoint" namespace = "Microsoft. Sharepoint. webcontrols" assembly = "Microsoft. Sharepoint, version = 12.0.0.0, culture = neutral, publickeytoken = 71e9bce111e9429c" %>
<% @ Register tagprefix = "webpartpages" namespace = "Microsoft. Sharepoint. webpartpages" assembly = "Microsoft. Sharepoint, version = 12.0.0.0, culture = neutral, publickeytoken = 71e9bce111e9429c" %>
<% @ 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 = "wssuc" tagname = "welcome" src = "~ /_ Controltemplates/welcome. ascx "%>
<% @ Register tagprefix = "wssuc" tagname = "designmodeconsole" src = "~ /_ Controltemplates/designmodeconsole. ascx "%>
<% @ 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 "%>
<% -- Uses the Microsoft Office namespace and schema. -- %>
<HTML>
<Webpartpages: spwebpartmanager runat = "server"/>
<SharePoint: robotsmetatag runat = "server"/>
<Head runat = "server">
<Asp: contentplaceholder runat = "server" id = "head">
<Title>
<Asp: contentplaceholder id = "placeholderpagetitle" runat = "server"/>
</Title>
</ASP: contentplaceholder>
<SharePoint: csslink runat = "server"/>
<Asp: contentplaceholder id = "placeholderadditionalpagehead" runat = "server"/>
</Head>
<Body onload = "javascript: _ spbodyonloadwrapper ();">
<Form runat = "server" onsubmit = "Return _ spformonsubmitwrapper ();">
<Wssuc: Welcome id = "explitlogout" runat = "server"/>
<Publishingsiteaction: siteactionmenu runat = "server"/>
<Publishingwebcontrols: authoringcontainer id = "authoringcontrols" runat = "server">
<Publishingconsole: Console runat = "server"/>
</Publishingwebcontrols: authoringcontainer>
<Asp: contentplaceholder id = "placeholdermain" runat = "server"/>
<Asp: Panel visible = "false" runat = "server">
<Asp: contentplaceholder id = "placeholdersearcharea" runat = "server"/>
<Asp: contentplaceholder id = "placeholdertitlebreadcrumb" runat = "server"/>
<Asp: contentplaceholder id = "placeholderpagetitleintitlearea" runat = "server"/>
<Asp: contentplaceholder id = "placeholderleftnavbar" runat = "server"/>
<Asp: contentplaceholder id = "placeholderpageimage" runat = "server"/>
<Asp: contentplaceholder id = "placeholderbodyleftborder" runat = "server"/>
<Asp: contentplaceholder id = "placeholdernavspacer" runat = "server"/>
<Asp: contentplaceholder id = "placeholdertitleleftborder" runat = "server"/>
<Asp: contentplaceholder id = "placeholdertitleareaseparator" runat = "server"/>
<Asp: contentplaceholder id = "placeholderminiconsole" runat = "server"/>
<Asp: contentplaceholder id = "placeholdercalendarnavigator" runat = "server"/>
<Asp: contentplaceholder id = "placeholderleftactions" runat = "server"/>
<Asp: contentplaceholder id = "placeholderpagedescription" runat = "server"/>
<Asp: contentplaceholder id = "placeholderbodyareaclass" runat = "server"/>
<Asp: contentplaceholder id = "placeholdertitleareaclass" runat = "server"/>
</ASP: Panel>
</Form>
</Body>
</Html>
Then let's get to know these placeholders:
1. <asp: contentplaceholder id = "placeholderglobalnavigationsitemap" runat = "server"/>
It is generally placed on the top of the line to display the site name, click to return to the home page; this is a placeholder, containing the control default syntax is:
<Asp: contentplaceholder id = "placeholderglobalnavigationsitemap" runat = "server">
<Asp: sitemappath sitemapprovider = "spsitemapprovider" id = "globalnavigationsitemap" rendercurrentnodeaslink = "true" skiplinktext = "" nodestyle-cssclass = "MS-Example" runat = "server"/>
</ASP: contentplaceholder>
2. <asp: contentplaceholder id = "placeholderglobalnavigation" runat = "server"/>
Place a placeholder for the content of the top row. Generally, you can add tables in the middle and add the required items, such as welcome information and my site. For example, welcome information:
<Asp: contentplaceholder id = "placeholderglobalnavigation" runat = "server">
<Wssuc: Welcome id = "idwelcome" runat = "server" enableviewstate = "false"> </wssuc: Welcome> </ASP: contentplaceholder>
The welcome information can also be taken out separately for other locations.
3. <asp: contentplaceholder id = "placeholdersitename" runat = "server"/>
Place the placeholder for the large site name next to the logo; the default content added in the middle is:
<SharePoint: splinkbutton runat = "server" navigateurl = "~ Site/"id =" onetidprojectpropertytitle ">
<SharePoint: projectproperty property = "title" runat = "server"/>
</SharePoint: splinkbutton>
To be continued