programming4us
programming4us
WEBSITE

Sharepoint 2013 : SharePoint Publishing Infrastructure (part 5) - Content Management - Putting It All Together

1/20/2015 7:47:56 PM

Putting It All Together

Now that you have a general idea of how publishing content types, master pages, and page layouts work. I will demonstrate how they all work together. For the sake of my demonstration I shall use out-of-the-box content types, page layouts, and master pages.

  1. Open the SharePoint publishing site (created earlier in this chapter).
  2. Click the gear icon.
  3. Select the menu item to view all site content.
  4. Click the Pages document library ellipses.
  5. Navigate to the Pages document library settings.
  6. Scroll to the section for content types.

    Figure 8 shows the content types listed in my publishing site pages library, which tells me I can create Welcome Pages, Article Pages, Error Pages, and base Publishing Pages.

    9781430249412_Fig10-08.jpg

    Figure 8. Pages library settings

     Note  Error Pages are new to SharePoint 2013.

  7. Return to the Site contents page.
  8. Click the Pages document library to access the pages in the current site.
  9. You should see a page similar to that in Figure 9.

    9781430249412_Fig10-09.jpg

    Figure 9. Pages library

As you can see by looking at Figure 9, the pages library is similar to any other document library, in that it contains a file and associated metadata—page instances. Each page instance is a list item with attached ASPX file. You might assume that the attached ASPX file is the page layout, but it is not. If you download the ASPX file and open the file in Notepad, the file contains references to the page layout in the Master Page Gallery and other publishing-related data.

  • 10.   Click the ellipses for the page instance.
  • 11.   From the settings popup ellipses, click the menu item to view properties.
  • 12.   Figure 10 shows a list of site columns and associated values.

9781430249412_Fig10-10.jpg

Figure 10. Page instance view properties

The page shown in Figure 10 is the “list view” of a publishing page. Just like any other list or document library, a content owner may edit the values (properties) for each column of the list item. Next, I shall show you how the property data renders on publishing pages, using a page layout.

  • 13.   Click the gear icon.
  • 14.   Select the menu item for creating a new page.
  • 15.   In the dialog that appears, give the page a name.
  • 16.   Click the OK button.
  • 17.   You should see a page like that in Figure 11.

9781430249412_Fig10-11.jpg

Figure 11. New page instance created

What just happened? In response to you requesting a new page, SharePoint created a new page instance in the Pages document library, using the default content type for the library and default page layout. You might be wondering how SharePoint decided which content type and page layout it chose. I shall enlighten you in the following steps:

  • 18.   Click the gear icon.
  • 19.   Select the Site settings menu item.
  • 20.   On the site settings page, click the link for page layouts and site templates.
  • 21.   Scroll to the section New Page Default Settings (Figure 12).

9781430249412_Fig10-12.jpg

Figure 12. New page default settings

You remember from my description of page layouts, in an earlier section of this chapter, that page layouts associate with a content type. Page layouts must associate with a content type because they map the site columns of a content type to HTML markup.

As shown in Figure 12, SharePoint has provided a list of all available page layouts from the Master Page Gallery and their associated content types (in parentheses). You might have noticed that different page layouts associate with the same content type as others. Content owners create page instances using the content type, and the site designer can choose from a number of presentation formats, based on the chosen page layout. For example, the Article content type associates with the page layouts “Image on left” and “Image on right.” The content owner does not care where the page image appears—this is the job of the site designer, and the reason for multiple layouts. The site designer can change the page layout of any given page as long as the content type of the page associates with the chosen page layout.

Getting back to the example, you created a new page instance, which defaulted to the Article content type and Body only page layout. I will show you how to change these for the page you just created if you did not want this content type or page layout.

  • 22.   Navigate back to the page view of the page you just created (Figure 11).
  • 23.   If you are not already in edit mode, click the gear icon and select the edit page menu item.
  • 24.   Click the Page tab on the ribbon.
  • 25.   Click the page layout icon, and SharePoint shows you a list of available of page layouts, grouped by content type.
  • 26.   Choose one by clicking on it (I chose one with a different content type).
  • 27.   SharePoint now shows you the page in the new layout.

What is nice about changing page layouts is that SharePoint will also change the associated content type of the page instance. The new effect is that your page instance may now have additional site columns and may have lost some you had before. Do not worry about content loss—if you populated with data a site column field that is not present in the new content type, SharePoint will retain the data, should you decide to switch back the content type and page layout.

Note  The process for creating page instances with default content type and page layout, and then changing page layout later, is simpler than the method required by SharePoint 2007 and 2010.

Other  
  •  Show the whole car kingdom “What’ll you do?”, Porsche (Part 1)
  •  Sharepoint 2013 : List and library essentials - Organizing items by using folders
  •  Sharepoint 2013 : List and library essentials - Sorting or filtering a list view
  •  Sharepoint 2013 : List and library essentials - Creating and selecting a list view
  •  Microsoft SharePoint 2010 : InfoPath Forms Services - Responding to Events in InfoPath Forms (part 2) - Adding Code-Behind
  •  Microsoft SharePoint 2010 : InfoPath Forms Services - Responding to Events in InfoPath Forms (part 1) - Using the Rules Engine
  •  Microsoft SharePoint 2010 : InfoPath Forms Services - Accessing Data in InfoPath Forms (part 2) - Data Connection Libraries, Modifying UDC Files
  •  Microsoft SharePoint 2010 : InfoPath Forms Services - Accessing Data in InfoPath Forms (part 1)
  •  Extra-Curricular Activity - BMW 218d Active Tourer SE - An Engine That’s Fit For A Juke - Nissan Juke Tekna DIG-T (Part 1) - BMW 218d Active Tourer SE
  •  The Porsche Macan S Diesel 3.0 V6 – The Ultimate SUV You Can Drive (Part 2)
  •  
     
    Video tutorials
    - How To Install Windows 8

    - How To Install Windows Server 2012

    - How To Install Windows Server 2012 On VirtualBox

    - How To Disable Windows 8 Metro UI

    - How To Install Windows Store Apps From Windows 8 Classic Desktop

    - How To Disable Windows Update in Windows 8

    - How To Disable Windows 8 Metro UI

    - How To Add Widgets To Windows 8 Lock Screen

    - How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010
    programming4us programming4us
    Video
    programming4us
     
     
    programming4us