Topics


Before adding news articles, you need to configure your topics. Article topics visually define your posts through the use of icons displayed with the text. Go to the Administration Menu and click the Topics link. You can see the two default topics, Linux and PostNuke, in Figure 5.1.

Figure 5.1. The Topics Manager.


You can replace those icons with topics of your own. Topics can relate to any subject, the content, or groups of articles, but it's best to make your topics similar to one another. Too many topics can make it hard for your visitors to use, so try to balance your content to group ratio carefully. Topic images can also be any file size or dimension, but smaller images load faster and take up less page space.

If your site is about general computer hardware, for example, you probably want a topic for each of the different types of cards and drives. You probably do not want or need a topic for every specific brand and model of video cardjust a "video cards" topic that covers them all.

First, remove the two demonstration topics. Click on one of the topics under the Current Active Topics header. You see a screen similar to Figure 5.2.

Figure 5.2. Editing an existing topic.


You can see each topic has a number of information fields associated with it. The first three fields describe the topic by Topic Name, Topic Text, and Topic Image. The fourth area titled Add Related Links lets you define additional offsite uniform resource locators (URLs) that relate to the topic's content. The Related Links appear in the right-side article blocks mentioned in Chapter 3, "PostNuke Essentials."

Click the Delete link at the bottom of the form. You have the opportunity to confirm the removal, and note the warning that is displayed:

 Are you sure you want to delete topic Linux? This will delete ALL its stories and comments! 

This illustrates how tied articles and topics are. Removing a topic also deletes all articles attached to it. That is why it's very important to set up your topics before you add articles. You can add more topics, reassign article/topic connections, and rename topics in an existing PostNuke site, but it's much easier to do a little planning beforehand and get them set up right before your site goes live.

Click Yes to remove the topic. Then select the other topic and remove it as well. For this example, three images of major pieces of computer hardware are included with the book materials. You can download these sample images from this book's online materials, or simply create your own images to try out. The images provided are 100 pixels by 90 pixels GIFs named

  • icon-harddrive.gif

  • icon-mainboard.gif

  • icon-videocard.gif

Though not required, it's a good rule of thumb to use a consistent naming convention with your image files. That way, references to your files are consistent, and it is easy to identify images at a later time.

PostNuke topics are stored in the /images/topics/ folder off your web root. Copy the new topic images to that directory on your server. You might notice that four other files are already present. The linux.gif and PostNuke.gif files were the ones previously used by topics, and there is an additional AllTopics.gif sample icon. If you have no plans to use those in the future, they can be deleted now. Leaving them is also harmless; they only take up minimal server space. The index.html file is blank and meant to deter directory browsing. It should be left intact.

Return to the Topics Manager page shown in Figure 5.1 and fill out the Add a New Topic section. For the hard drive topic, enter "harddrives" in the Topic Name text box. This name cannot contain spaces and is the name used in PostNuke's code. The Topic Text field contains the plain-English description of the topic that will appear with the icon; enter "Hard Drives." Finally, type the topic's icon filename, icon-harddrive.gif, in the Topic Image text box. When done, click the Add Topic button.

You now see your new topic displayed under the Current Active Topics header. It should look similar to Figure 5.3.

Figure 5.3. Your first topic.


Use the Add a New Topic form to to add at least two more topics using the other computer hardware images or your own to complete the initial topic setup. When you have completed them, your Topics Manager page should look similar to Figure 5.4.

Figure 5.4. Custom article topics ready for use.




    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