Click Here!
home account info subscribe login search My ITKnowledge FAQ/help site map contact us


 
Brief Full
 Advanced
      Search
 Search Tips
To access the contents, click the chapter and section titles.

Platinum Edition Using HTML 4, XML, and Java 1.2
(Publisher: Macmillan Computer Publishing)
Author(s): Eric Ladd
ISBN: 078971759x
Publication Date: 11/01/98

Bookmark It

Search this book:
 
Previous Table of Contents Next


The HREF attribute is set to the logo image’s URL, enabling Internet Explorer to download it. The STYLE attribute denotes the context in which the image is used. If you choose the ICON style, your image must be 16 pixels wide by 16 pixels high (see Figure 17.2). It is used together with the channel title to identify the channel in places such as the Internet Explorer title bar. If you go with the IMAGE style, the image must be 80 pixels wide by 32 pixels high. This type of image is what users see in the Channels Bar. Finally, the IMAGE-WIDE image, which is used to provide a link to the channel main page, has to be 194 pixels wide by 32 pixels high.


FIGURE 17.2  The Channels Bar is a framelike window for choosing which channels you want to view.

With a logo added in, your CDF code now changes to

<CHANNEL HREF=”http://www.server.com/channezl/subscribe.html” LEVEL=4>
   <TITLE>Channel Z</TITLE>
   <ABSTRACT>Welcome to Channel Z, your Internet movie site.</ABSTRACT>
   <LOGO HREF=”http://www.server.com/channelz/images/zlogo.gif”
   STYLE=”ICON”/>
...
</CHANNEL>

You can specify an ICON, an IMAGE, and an IMAGE-WIDE logo for your channel by having three <LOGO/> tags—one for each of the possible values of STYLE.

With the channel structure and supporting items in place, you’re now ready to put some content in the channel. For our sample channel, we will create three major content areas: new releases, reviews, and show times. You’ll see how to add each of these in the next section.

The <ITEM> Element

<ITEM> is a container tag that you use to place content in your channel. Each <ITEM> ... </ITEM> tag pair corresponds to one page of your site, so each page you want as part of the channel needs its own <ITEM> tag.

The <ITEM> tag takes the mandatory HREF attribute, which is set equal to the URL of the document you want to include in the channel. You can modify the <ITEM> tag further by using one of the attributes shown in Table 17.2.

Table 17.2 Attributes of the <ITEM> Element

Attribute Purpose

HREF=”url” specifies the URL of the document to add to the channel
LASTMOD=”date” denotes when the document was last modified
LEVEL=”n” tells the browser how many levels below the document it should look and precache content
PRECACHE=”YES”|”NO” indicates whether the browser should precache content


NOTE:  If you set PRECACHE to NO, Internet Explorer ignores the LEVEL attribute.

You read above that <ITEM> is a container tag, so you may be wondering what you can put between <ITEM> and </ITEM>. The answer is that you can give the item its own title, abstract, and logo using the tags discussed in the previous few sections. Thus, a full-blown <ITEM> specification might look like

<ITEM HREF=”http://www.server.com/new/index.html”>
   <TITLE>New Movie Releases</TITLE>
   <ABSTRACT>New releases from the major studios this weekend</ABSTRACT>
   <LOGO HREF=”http://www.server.com/channelz/images/new.gif”
    STYLE=”ICON”>
</ITEM>

If you build an <ITEM> such as the one above for the other two areas of your site, your CDF code now looks like the following:

<CHANNEL HREF=”http://www.server.com/channelz/subscribe.html” LEVEL=4>
   <TITLE>Channel Z</TITLE>
   <ABSTRACT>Welcome to Channel Z, your Internet movie site.</ABSTRACT>
   <LOGO HREF=”http://www.server.com/channelz/images/zlogo.gif”
   STYLE=”ICON”/>
...
   <ITEM HREF=”http://www.server.com/new/index.html”>
      <TITLE>New Movie Releases</TITLE>
      <ABSTRACT>New releases from the major studios this
       weekend</ABSTRACT>
      <LOGO HREF=”http://www.server.com/channelz/images/new.gif”
       STYLE=”ICON”>
   </ITEM>

   <ITEM HREF=”http://www.server.com/reviews/index.html”>
      <TITLE>From the Critics</TITLE>
      <ABSTRACT>Find out what the critics said before you buy
       your ticket.</ABSTRACT>
      <LOGO HREF=”http://www.server.com/channelz/images/reviews.gif”
       STYLE=”ICON”>
   </ITEM>

   <ITEM HREF=”http://www.server.com/showtimes/index.html”>
      <TITLE>When and Where?</TITLE>
      <ABSTRACT>Find out what films are playing near you.
      </ABSTRACT>
      <LOGO HREF=”http://www.myserver.com/channelz/images/times.gif”
       STYLE=”ICON”>
   </ITEM>
...
</CHANNEL>

Now that you have content in your channel, one issue is left: setting up the update schedule.

The <SCHEDULE> Element

The <SCHEDULE> tag is a container tag that specifies the update schedule for the content you place in your channels. You can specify a <SCHEDULE> for the entire channel by placing it after the topmost <CHANNEL> tag and before the first nested <CHANNEL> tag. You can also assign a <SCHEDULE> to each <ITEM> by placing the <SCHEDULE> ... </SCHEDULE> tag pair inside the <ITEM> ... </ITEM> tag pair.


Previous Table of Contents Next


Products |  Contact Us |  About Us |  Privacy  |  Ad Info  |  Home

Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement.