SharePoint MOSS 2007 - Web Publishing Portal: Job Listing Site

2 minute read

A simple example of displaying dynamic content using a Content Query Web Part

One part of the demo site I'm working on is a typical "Job Openings" page. In the Corporate section of the website, the owners want to be able to direct users to a page that lists links to the 10 most recently posted job openings. This page needs to be dynamic so that when a new job opening is published (as an article page to the job Site) a link is automatically displayed on the Job Openings main page (the jobs site welcome page).

To do this, I'm going to create a new Site called "Jobs" where all the job opening content will be stored. We will use the default page on the Jobs Site (called a Welcome page in MOSS speak) to list the 10 most recent job postings.


  1. Goto the "Corporate" Site

  2. select "Create Site" from the Site Actions menu.


    1. set an appropriate title like "Careers"

    2. Web Site Address to be "jobs" (the full path should be "/corporate/jobs")

    3. Select the template "Publishing->Publishing Site"

    4. Leave the rest of the defaults so permissions and navigation inherit from the parent site. Click "OK" to create the Site.




Now that we've got our new Site in place to hold all the content, lets edit the jobs Site Welcome page to dynamically list any other Article Page content in this site. We'll assume that any Article Page published to this site will be a new job listing.


  1. Edit the "job" Site Welcome page

  2. Add a new "Content Query Web Part" to Left Column Web Part placement area. (I am assuming the default template being used is "Welcome page with summary links")

  3. Modify the settings Content Query Web Part you just added to do the following:


    1. Select "Query->Show items from the following site and all SubSites" and set the value to "/corporate/jobs"

    2. Change "Content Type->Show items of this type group" to "Page Layout Content Types"

    3. Change "Content Type->Show items of this content type" to "Article Page"

    4. Change "Presentation->Limit the number of items to display" to "10" and make sure the box next to that option is checked as well.

    5. Change the presentation, appearance and layout as needed to match the site look and feel

    6. Submit/publish changes to this page.




With that done, the Web Part will automatically display a list of pages created in this Site, sorted by create date in descending order (all default settings that can be changed by modifying the Web Part). Setting the content type filter in step 3.2 & 3.3 ensures that the default page for the Site will not be included in the list (the default site page is a welcome page, not an article page).

Tags:

Updated: