Monthly Archives: August 2011

Wrox: Beginning Sharepoint Designer 2010: Chapter 5

[Chapter 5: Styles and Themes]


Attribute selector: Select all input with type=”button”

Attribute selector: all inputs value=red/green/blue

Attribute selectors are case-sensitive for all attribute except TYPE (you can say “button” or “BUTTON”). The Value is always case sensitive.

This matches both type and class:

When specifying a unit or measure of a CSS property, do not leave space between number and unit. Such as 100px

Best approach for managing styles: using external style sheet.

SharePoint’s default external CSS file: core4.css

*** Sharepoint Designer’s CSS Tools, Page 151


Wrox: Beginning Sharepoint Designer 2010: Chapter 4

[Chapter 4: Publishing Pages]

Web content management (WCM) is a set of processes that lets you manage the life cycle of the information stored and presented by your web site – where you create, customize, deploy and dispose of web content.

WCM typically include:
(1) Electronic forms
(2) Approval workflow
(3) Scheduling workflow to ensure that the content is displayed, reviewed and removed from view on a timely basis.
(4) Templates to ensure visual consistency.

In Sharepoint 2010, the WCM is called publishing features.

Two site templates that are most relevant to the publishing features:
(1) Publishing Portal and
(2) Enterprise Wiki.

Creating a site collection via one of these two templates enables publishing features automatically.

*** activating Publishing in a Team Site via web interface
Site Actions –> Site Settings –> Site Collection features

The same feature at the site level also needs to be activated.

** Publishing Pages —

3 Page types are available:
Site pages,
Application pages,
Publishing pages (once you activate Publishing Feature) – which is also called
Content Pages

Difference between Publishing and Non-Publishing pages, is that the former are composed of three parts –
(1) content
(2) master page
(3) layout

A page layout is an ASPX page that defines the layout of content. In some way, it is like a master page within a master page.

Right click a file (master page) and “Version History”, you can restore a previous file. Check out the file first.

both the master page and page layout are saved in Master Pages Gallery (for a team site type and others)

Files in this library has the following attributes:
(1) Versioning is turned on by default; major/minor versions are tracked. Draft item security is enabled so only users who can edit the item can see them.
(2) Content approval is required for new/edited item. Note: During site customization, turn this off, and disable checkout requirements, until you’re done with your work!!!
(Site Actions –> site Settings –> Master Page Gallery –>Library settings –> Version settings, or you can do it from SPD)



(3) Document checkout are required.
(4) permission are set for this document library.

For a Publishing Site, the Master page and Layout are in two difference views in SPD:

Page 119 – Editing the Example Publishing Master Page

default publishing master page – nightandday.master
dichotomy – similar to dilemma

Another easy way to copy/paste a master page

If you want to create a custom master page, the Starter Master page is a good choice. Import it and modify.

** Page Layout —

Page layout allows you to control the positioning of content on a publishing page by placing controls in areas on the page.  

*** The content type designated for a specific page layout determines the elements that are available for display on any pages that inherit from that page layout.

** Virtually every object in Sharepoint has a content type.

Content types contains columns that define particular aspects of a piece of content.

Only Site Content Types can be used as the basis for Publishing Pages.

A specific page layout is associated with a content type.

— Creating a publishing page from start to end – you’re now creating a new publishing page, with workflow, custom page layout, custom content type

First, create custom page layout content type. Use Article page layout as a basis as it’s close to what you’re doing.

Open SPD 2010, open a Publishing site, click on Content Type.  Select new content type:

Give it a name “Custom Article Page” and OK. Then you see the new custom content type in the window. Now we need to add a new column to it. (You need to add a new site column “Article Abstract”, which is a multi-line text) 

Add a new site column, click on the Site Column, and New Column –> Multi Lines of Text

So now you have a new Custom Content type (Custom Article Page), and a new site column (Article Abstract). Add the new site column to the new content type.  

Go to the new content type’s setting page:

Click Edit Content Type Column


Click add Existing Site Column, then select Article Abstract to add. Done. Also add Rating.

So you have this in the new content type:

*** Creating a Custom Page Layout (assign the new content type to this new layout)
Click Page Layout –> New Page Layout.

When you select a Content Type for a page Layout, you’re only allow to select a layout from either of these two groups – so make sure you save your new content type under either of them.

This completes creating a new Page Layout with a new content type.

*** Field Controls (??) – We will add Ratings and Article Abstract controls to your page layout.

Open ArticleLeft.aspx (existing page layout), copy and paste the content to you new layout (NewsArticlePagewithRatings.aspx), and the save it. Move cursor to the end of this tag:

There, insert Article Abstract from menu. it’s a site column we added.

Now you can create a page based on the new layout (NewsArticlewithRatings).  

First you need to define the default layout as he NewsArticlewithRating
Site Actions –> Site Settings –> Page Layouts and Site Templates

Select layouts available for this and subsites.

Create new page: Site Actions –> New Page
Enter page name.

When you see in SPD a blue icon next to a file name (master page, layout etc.), it means it’s customized.

Page 137, 08/09/2011, 09:12PM