Sections


Longer articles that don't have a timely nature, such as guides, opinions, or other relatively static content, can be placed in the Sections module. Sections can each have a graphical header image displayed over article selections, and multiple pages are supported for section articles using a page break tag.

Section articles are completely unconnected to the news story modules. They can be searched together using the global site search, but the news topics and categories do not apply to section articles.

When you first enter the Sections Administration area, you only see a simple form prompting you to create a section. You must have at least one section created before you can add articles to the module. Create a new example section called "Section 1." You can rename an existing section later. Look at the complete Sections Administration page shown in Figure 5.10. The page has four main areas. The first and last, Active Sections and Add a New Section, allow you to edit the sections themselves, whereas the second and third, Add a New Article Under a Section and Last 20 Articles, relate to the articles present within sections.

Figure 5.10. Sections Administration page.


The areas of the page are arranged by live site usage, with more commonly needed areas on top. But to set up your sections, you need to scroll to the bottom of the page to Add a New Section.

Look in your site's /images/sections/ directory. Three files are included there as part of the PostNuke package. The TRansparent.gif image is a spacing shim used by the Sections module; do not remove it from this folder. index.html is provided as a security measure against directory browsing, and it should also remain.

The template.gif image is a simple empty frame drawn in the blocky image style used with other built-in PostNuke images. You can use it to make section header images that match the rest of PostNuke. If you are customizing your site fully, you do not need this template file. A sample header image using the template file is available in the book's downloads. It is called guides-mainboards.gif and can be downloaded with this chapter's online materials.

Type a section name, such as "Mainboard Guides," in the Section Name text box, and enter in the name of a section image in the Section Image text box. Click the Add Section button to complete the form. The page refreshes and you see your new section listed under Active Sections at the top.

Now add a new section article. The Add a New Article Under a Section form is very simple; you need to enter a title for the article in the Title text box, and pick your section name from the list provided. Language is the same here as it was with the News Articles module; choose the language that best describes the content. Enter your complete article text in the Content field. Pages are divided using the <!--pagebreak--> tag comment described on the page.

Following a click on the Add New Article button, the page refreshes again, and you see your article listed in the Last 20 Articles area. The Last 20 Articles area also has a useful form for editing past articles by their ID. The ID number for any PostNuke content can be easily determined by the item's URL. For sections, look for &artid= in the URL address. The number after that is the ID of the section article you are viewing.

Tip

You can quickly check the ID of an article without reading it by mousing over a link to the article and looking at your browser's status bar, which displays the link in full.


If you need to edit an article, but don't have a link handy, you can also click the article's section link under Active Sections. The Edit Section page allows you to edit a section's name and image, or you can edit any article contained within the section using the article title drop-down list box (see Figure 5.11).

Figure 5.11. Edit Section and its articles.


It is also possible to extend the functionality of the Sections module using hacks and third-party add-ons. You can hack sections to include categories similar to the News Article module. In addition, static web pages can be pulled into the PostNuke shell using a wrapper, such as Nuke Wrapper or Post Wrap. These techniques and third-party modules are discussed in Chapter 18, "Static XHTML and PostNuke."



    PostNuke Content Management
    PostNuke Content Management
    ISBN: 0672326868
    EAN: 2147483647
    Year: 2003
    Pages: 207
    Authors: Kevin Hatch

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net